public class ServerComponent extends Component
appName, dataPrefix, eacHost, eacPort, elementId, lockManager, logDir, sslEnabled, workingDir
Constructor and Description |
---|
ServerComponent() |
Modifier and Type | Method and Description |
---|---|
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(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(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.
|
archiveLogDir, buildEacStub, cleanDir, constructArchiveLogDir, constructCleanDir, getCustomDirectories, getDirProperties, getHost, getHostId, getLongPropertyValueOrDefault, getMaxMissedStatusChecksAllowed, getMaxWaitTimeSeconds, getMinWaitTimeSeconds, getNumLogBackups, getNumMissedStatusChecks, getProperties, getProperty, getSlowPollingIntervalMs, getStandardPollingIntervalMs, getStatus, incrementMissedStatusQueries, initializeEacStub, isActive, isDefined, isDefinitionChanged, isFailed, isHotUpdateDefinitionChange, isSkipTestingForFilesDuringCleanup, removeDefinition, setCustomDirectories, setDefinition, setDefinition, setHost, setHostId, setNumMissedStatusChecks, setProperties, updateDefinition, updateEacDefinition, updateEacDefinition, waitForFinished
getAppDefinitionFromEac, getCachedAppDefinition, getProvisioningPort, invalidateCachedAppDefinition, setCachedAppDefinition
getAppName, getDataPrefix, getEacHost, getEacPort, getElementId, getLockManager, getLogDir, getWorkingDir, isSslEnabled, setAppName, setDataPrefix, setEacHost, setEacPort, setElementId, setLockManager, setLogDir, setSslEnabled, setWorkingDir
public static void startInParallel(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(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
public void startAsynchronously() throws 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, InterruptedException, AppConfigurationException
EacCommunicationException
- If a communication error occurs while
cycling the component.EacComponentControlException
- If an error occurs while trying to
cycle the component.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)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.