|
EAC Toolkit 3.2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.soleng.eac.toolkit.base.EacElement com.endeca.soleng.eac.toolkit.base.Provisionable com.endeca.soleng.eac.toolkit.component.Component com.endeca.soleng.eac.toolkit.component.ServerComponent
public class ServerComponent
ServerComponent extends component to expose utilities for running server components (e.g. dgraph, logserver). This object implements methods to start a component synchronously, or to start multiple components synchronously and in parallel.
Field Summary |
---|
Fields inherited from class com.endeca.soleng.eac.toolkit.base.EacElement |
---|
appName, dataPrefix, eacHost, eacPort, elementId, lockManager, logDir, sslEnabled, workingDir |
Constructor Summary | |
---|---|
ServerComponent()
|
Method Summary | |
---|---|
void |
cycle()
Cycles the server component. |
int |
getNumIdleSecondsAfterStop()
|
Script |
getPostStartupScript()
|
Script |
getPreShutdownScript()
|
long |
getShutdownTimeout()
|
long |
getStartupTimeout()
|
boolean |
isRunning()
Returns true if the component is running. |
boolean |
isStarting()
Returns true if the component is starting. |
void |
setPostStartupScript(Script postStartupScript)
|
void |
setPreShutdownScript(Script preShutdownScript)
|
void |
setStartupTimeout(long startupTimeout)
|
void |
start()
Starts the component. |
void |
startAsynchronously()
Starts the component asynchronously, without testing its status after sending the start command. |
static void |
startInParallel(java.util.List<ServerComponent> components)
Starts server components in parallel. |
void |
stop()
Stops the component. |
void |
stopAsynchronously()
Stops the component asynchronously, without testing its status after sending the stop command. |
static void |
stopInParallel(java.util.List<ServerComponent> components)
Stop server components in parallel. |
boolean |
waitForStarted()
Waits for the component to start, by polling for its status every second, until the startup timeout has elapsed. |
boolean |
waitForStopped()
Waits for the component to stop, by polling for its status every second, until the stop timeout has elapsed. |
Methods inherited from class com.endeca.soleng.eac.toolkit.base.Provisionable |
---|
getAppDefinitionFromEac, getCachedAppDefinition, getProvisioningPort, invalidateCachedAppDefinition, setCachedAppDefinition |
Methods inherited from class com.endeca.soleng.eac.toolkit.base.EacElement |
---|
getAppName, getDataPrefix, getEacHost, getEacPort, getElementId, getLockManager, getLogDir, getWorkingDir, isSslEnabled, setAppName, setDataPrefix, setEacHost, setEacPort, setElementId, setLockManager, setLogDir, setSslEnabled, setWorkingDir |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServerComponent()
Method Detail |
---|
public static void startInParallel(java.util.List<ServerComponent> components) throws EacCommunicationException, EacComponentControlException
EacCommunicationException
- If a communication error occurs while
requesting the status of a component from the EAC.
EacComponentControlException
- If an error occurs while trying to
start a component.public static void stopInParallel(java.util.List<ServerComponent> components) throws EacCommunicationException, EacComponentControlException
EacCommunicationException
- If a communication error occurs while
requesting the status of a component from the EAC.
EacComponentControlException
- If an error occurs while trying to
stop a component.public void start() throws EacCommunicationException, EacComponentControlException
Component
start
in class Component
EacCommunicationException
- If a communication error occurs while
requesting the status of the component from the EAC.
EacComponentControlException
- If an error occurs while trying to
start the component.public void stop() throws EacCommunicationException, EacComponentControlException
Component
stop
in class Component
EacCommunicationException
- If a communication error occurs while
requesting the status of the component from the EAC.
EacComponentControlException
- If an error occurs while trying to
stop the component.public void stopAsynchronously() throws EacCommunicationException, EacComponentControlException
EacCommunicationException
EacComponentControlException
public void startAsynchronously() throws EacCommunicationException, EacComponentControlException
EacCommunicationException
EacComponentControlException
public boolean waitForStarted() throws EacCommunicationException, EacComponentControlException
EacCommunicationException
- If a communication error occurs while
requesting the status of the component from the EAC.
EacComponentControlException
- If an error occurs while trying to
check the status of the component.public boolean waitForStopped() throws EacCommunicationException, EacComponentControlException
EacCommunicationException
- If a communication error occurs while
requesting the status of the component from the EAC.
EacComponentControlException
- If an error occurs while trying to
check the status of the component.public boolean isStarting() throws EacCommunicationException, EacComponentControlException
EacCommunicationException
- If a communication error occurs while
requesting the status of the component from the EAC.
EacComponentControlException
- If an error occurs while trying to
check the status of the component.public boolean isRunning() throws EacCommunicationException, EacComponentControlException
EacCommunicationException
- If a communication error occurs while
requesting the status of the component from the EAC.
EacComponentControlException
- If an error occurs while trying to
check the status of the component.public void cycle() throws EacCommunicationException, EacComponentControlException, java.lang.InterruptedException, AppConfigurationException
EacCommunicationException
- If a communication error occurs while
cycling the component.
EacComponentControlException
- If an error occurs while trying to
cycle the component.
java.lang.InterruptedException
- If the thread is interrupted while waiting for
a component to finish.
AppConfigurationException
- If a utility fails to initialize because of
insufficient configuration information.public long getStartupTimeout()
public void setStartupTimeout(long startupTimeout)
public long getShutdownTimeout()
public int getNumIdleSecondsAfterStop()
public Script getPreShutdownScript()
public void setPreShutdownScript(Script preShutdownScript)
public Script getPostStartupScript()
public void setPostStartupScript(Script postStartupScript)
|
EAC Toolkit 3.2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@VERSION PRODUCT: EAC Toolkit (eacToolkit) VERSION: 3.2.1 BUILD: NONE ARCH_OS: n/a DATE: 2011-11-10T16:21:05-0500