public class ScriptRunner extends GenericService
Created: November 14 2011
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| static int | DEFAULT_SLEEP_TIMEOur default sleep time when polling for status. | 
| static java.lang.String | PROVISIONING_SERVICE_SUFFIXURL suffix for our end point. | 
| static java.lang.String | SERVICE_SUFFIXURL suffix for our end point. | 
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description | 
|---|
| ScriptRunner() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected java.lang.String | calculateEndpointAddress()Calculate our endepoint address from serviceProtocol, eacHost,
 eacPort and SERVICE_SUFFIX. | 
| protected java.lang.String | calculateProvisioningEndpointAddress()Calculate our endepoint address from serviceProtocol, eacHost,
 eacPort and PROVISIONING_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. | 
| ApplicationType | getApplication(java.lang.String pAppName)Return the ApplicationType object representing the specified application. | 
| 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. | 
| protected ProvisioningServiceLocator | getProvisioningLocator()Return the provisioning locator. | 
| protected ProvisioningPort | getProvisioningPort()Return the provisioning port. | 
| java.lang.String[] | getScriptIdsForApplication(java.lang.String pAppName) | 
| 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,
             boolean pThrowExceptionIfFailed)Wait for the specified EAC script to finish. | 
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
public static final int DEFAULT_SLEEP_TIME
public static final java.lang.String SERVICE_SUFFIX
public static final java.lang.String PROVISIONING_SERVICE_SUFFIX
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 GenericServiceServiceException - if the Service had a problem starting uppublic void externalExec(java.lang.String pAppId,
                java.lang.String pScriptId)
                  throws IndexingException
pAppId - the specified Endeca application ID.pScriptId - the specified script ID.IndexingException - if execution failedpublic StateType exec(java.lang.String pAppId,
             java.lang.String pScriptId)
               throws IndexingException
pAppId - the Endeca application ID.pScriptId - the Endeca script name.IndexingException - if execution failedprotected java.lang.String calculateEndpointAddress()
protected java.lang.String calculateProvisioningEndpointAddress()
public ScriptControlPort startScript(java.lang.String pAppId,
                            java.lang.String pScriptId)
                              throws IndexingException
pAppId - the Endeca applicaiton IDpScriptId - the Endeca script ID.IndexingException - if script failed to startpublic ScriptControlPort stopScript(java.lang.String pAppId,
                           java.lang.String pScriptId)
                             throws IndexingException
pAppId - the Endeca applicaiton IDpScriptId - the Endeca script ID.IndexingException - if script stop did not succeedprotected ScriptControlServiceLocator getControlLocator()
                                                 throws javax.xml.rpc.ServiceException
ServiceException - if unable to retrieve script service locatorjavax.xml.rpc.ServiceExceptionprotected ScriptControlPort getControlPort()
                                    throws javax.xml.rpc.ServiceException
ServiceException - if unable to retrieve script control portjavax.xml.rpc.ServiceExceptionprotected ProvisioningServiceLocator getProvisioningLocator()
                                                     throws javax.xml.rpc.ServiceException
javax.xml.rpc.ServiceExceptionprotected ProvisioningPort getProvisioningPort()
                                        throws javax.xml.rpc.ServiceException
javax.xml.rpc.ServiceExceptionpublic ApplicationType getApplication(java.lang.String pAppName)
                               throws javax.xml.rpc.ServiceException,
                                      java.rmi.RemoteException
pAppName - the application name.javax.xml.rpc.ServiceExceptionjava.rmi.RemoteExceptionpublic java.lang.String[] getScriptIdsForApplication(java.lang.String pAppName)
                                              throws javax.xml.rpc.ServiceException,
                                                     java.rmi.RemoteException
javax.xml.rpc.ServiceExceptionjava.rmi.RemoteExceptionpublic StateType waitForScript(ScriptControlPort pScriptControlPort,
                      java.lang.String pAppId,
                      java.lang.String pScriptId,
                      boolean pThrowExceptionIfFailed)
                        throws IndexingException
pScriptControlPort - the control portpAppId - the Endeca application IDpScriptId - the Endeca script ID.IndexingException - if script execution failedpublic void testExec()
public void testStartWait()