|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.endeca.eacclient.ScriptRunner
public class ScriptRunner
A Nucleus service that can execute an Endeac EAC script. Generally used for kicking off baseline or partial indexing tasks.
Created: November 14 2011
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string from source code control system. |
static int |
DEFAULT_SLEEP_TIME
Our default sleep time when polling for status. |
static java.lang.String |
SERVICE_SUFFIX
URL suffix for our end point. |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
ScriptRunner()
|
Method Summary | |
---|---|
protected java.lang.String |
calculateEndpointAddress()
Calculate our endepoint address from serviceProtocol, eacHost, eacPort and SERVICE_SUFFIX. |
void |
doStartService()
This is called after a Service has been created, placed into the naming hierarchy, and initialized with its configured property values. |
StateType |
exec(java.lang.String pAppId,
java.lang.String pScriptId)
execute EAC script for given application id and script id. |
void |
externalExec(java.lang.String pAppId,
java.lang.String pScriptId)
Execute the specified script. |
protected ScriptControlServiceLocator |
getControlLocator()
Return the script control service locator given our current configuration. |
protected ScriptControlPort |
getControlPort()
Return the control port based on our current configuration. |
java.lang.String |
getEACHost()
Returns property EACHost. |
int |
getEACPort()
Returns property EACPort. |
long |
getEACScriptTimeout()
Returns property EACScriptTimeout in milliseconds. |
java.lang.String |
getServiceProtocol()
Returns property serviceProtocol. |
int |
getSleepTime()
Returns property sleepTime. |
void |
setEACHost(java.lang.String pEACHost)
Sets property EACHost. |
void |
setEACPort(int pEACPort)
Sets property EACPort. |
void |
setEACScriptTimeout(long pEACScriptTimeout)
Sets property EACScriptTimeout in milliseconds. |
void |
setServiceProtocol(java.lang.String pServiceProtocol)
Sets property serviceProtocol. |
void |
setSleepTime(int pSleepTime)
Sets property sleepTime. |
ScriptControlPort |
startScript(java.lang.String pAppId,
java.lang.String pScriptId)
Start EAC script for given application id and script id. |
ScriptControlPort |
stopScript(java.lang.String pAppId,
java.lang.String pScriptId)
Stop/cancel EAC script for given application id and script id. |
void |
testExec()
Test BaselineUpdate script directly Not used anymore |
void |
testStartWait()
Test BaselineUpdate script directly using startScript and waitForScript Not used anymore |
StateType |
waitForScript(ScriptControlPort pScriptControlPort,
java.lang.String pAppId,
java.lang.String pScriptId)
Wait for the specified EAC script to finish. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
public static final int DEFAULT_SLEEP_TIME
public static final java.lang.String SERVICE_SUFFIX
Constructor Detail |
---|
public ScriptRunner()
Method Detail |
---|
public void setEACHost(java.lang.String pEACHost)
public java.lang.String getEACHost()
public void setEACPort(int pEACPort)
public int getEACPort()
public void setEACScriptTimeout(long pEACScriptTimeout)
public long getEACScriptTimeout()
public void setSleepTime(int pSleepTime)
public int getSleepTime()
public void setServiceProtocol(java.lang.String pServiceProtocol)
public java.lang.String getServiceProtocol()
public void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting uppublic void externalExec(java.lang.String pAppId, java.lang.String pScriptId) throws atg.repository.search.indexing.IndexingException
pAppId
- the specified Endeca application ID.pScriptId
- the specified script ID.
atg.repository.search.indexing.IndexingException
- if execution failedpublic StateType exec(java.lang.String pAppId, java.lang.String pScriptId) throws atg.repository.search.indexing.IndexingException
pAppId
- the Endeca application ID.pScriptId
- the Endeca script name.
atg.repository.search.indexing.IndexingException
- if execution failedprotected java.lang.String calculateEndpointAddress()
public ScriptControlPort startScript(java.lang.String pAppId, java.lang.String pScriptId) throws atg.repository.search.indexing.IndexingException
pAppId
- the Endeca applicaiton IDpScriptId
- the Endeca script ID.
atg.repository.search.indexing.IndexingException
- if script failed to startpublic ScriptControlPort stopScript(java.lang.String pAppId, java.lang.String pScriptId) throws atg.repository.search.indexing.IndexingException
pAppId
- the Endeca applicaiton IDpScriptId
- the Endeca script ID.
atg.repository.search.indexing.IndexingException
- if script stop did not succeedprotected ScriptControlServiceLocator getControlLocator() throws javax.xml.rpc.ServiceException
ServiceException
- if unable to retrieve script service locator
javax.xml.rpc.ServiceException
protected ScriptControlPort getControlPort() throws javax.xml.rpc.ServiceException
ServiceException
- if unable to retrieve script control port
javax.xml.rpc.ServiceException
public StateType waitForScript(ScriptControlPort pScriptControlPort, java.lang.String pAppId, java.lang.String pScriptId) throws atg.repository.search.indexing.IndexingException
pScriptControlPort
- the control portpAppId
- the Endeca application IDpScriptId
- the Endeca script ID.
atg.repository.search.indexing.IndexingException
- if script execution failedpublic void testExec()
public void testStartWait()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |