Class AbstractLifeCycle
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
- All Implemented Interfaces:
LifeCycle
- Direct Known Subclasses:
AbstractLeakPreventer, AcceptRateLimit, AllowedResourceAliasChecker, BaseHolder, CompressionPool, ConnectionLimit, ConnectionStatistics, ConnectorServer, ConnectorStatistics, ContainerLifeCycle, DebugListener, HouseKeeper, LeakDetector, PathWatcher, PropertyUserStoreManager, RequestLogWriter, ReservedThreadExecutor, Scanner, ScanningAppProvider, ScheduledExecutorScheduler, ServletContainerInitializersStarter, ServletContextHandler.Initializer, Slf4jRequestLogWriter, SpnegoLoginService, SslContextFactory, StopLifeCycle, Sweeper, TimerScheduler, UserStore
@ManagedObject("Abstract Implementation of LifeCycle")
public abstract class AbstractLifeCycle
extends Object
implements LifeCycle
Basic implementation of the life cycle interface for components.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.Nested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLifeCycleListener(LifeCycle.Listener listener) protected voiddoStart()protected voiddoStop()getState()static StringlongbooleanisFailed()booleanbooleanbooleanbooleanbooleanvoidremoveLifeCycleListener(LifeCycle.Listener listener) voidsetStopTimeout(long stopTimeout) final voidstart()Starts the component.final voidstop()Stops the component.toString()
-
Field Details
-
STOPPED
- See Also:
-
FAILED
- See Also:
-
STARTING
- See Also:
-
STARTED
- See Also:
-
STOPPING
- See Also:
-
RUNNING
- See Also:
-
-
Constructor Details
-
AbstractLifeCycle
public AbstractLifeCycle()
-
-
Method Details
-
doStart
-
doStop
-
start
-
stop
Description copied from interface:LifeCycleStops the component. The component may wait for current activities to complete normally, but it can be interrupted. -
isRunning
-
isStarted
-
isStarting
public boolean isStarting()- Specified by:
isStartingin interfaceLifeCycle- Returns:
- true if the component is starting.
- See Also:
-
isStopping
public boolean isStopping()- Specified by:
isStoppingin interfaceLifeCycle- Returns:
- true if the component is stopping.
- See Also:
-
isStopped
-
isFailed
-
addLifeCycleListener
- Specified by:
addLifeCycleListenerin interfaceLifeCycle
-
removeLifeCycleListener
- Specified by:
removeLifeCycleListenerin interfaceLifeCycle
-
getState
@ManagedAttribute(value="Lifecycle State for this instance", readonly=true) public String getState() -
getState
-
getStopTimeout
-
setStopTimeout
public void setStopTimeout(long stopTimeout) -
toString
-
LifeCycle.Listenerhas default methods.