Package org.eclipse.jetty.util.component
Interface LifeCycle
- All Known Subinterfaces:
Connector,Handler,HandlerContainer,NetworkConnector,Scheduler,ServletContextHandler.ServletContainerInitializerCaller,SessionCache,SessionDataMap,SessionDataStore,SessionIdManager
- All Known Implementing Classes:
AbstractConnectionFactory,AbstractConnectionPool,AbstractConnector,AbstractConnectorHttpClientTransport,AbstractHandler,AbstractHandler.ErrorDispatchHandler,AbstractHandlerContainer,AbstractHttpClientTransport,AbstractLifeCycle,AbstractLoginService,AbstractNCSARequestLog,AbstractNetworkConnector,AbstractSessionCache,AbstractSessionDataStore,AcceptRateLimit,AllowedResourceAliasChecker,AsyncDelayHandler,AsyncNCSARequestLog,AsyncRequestLogWriter,AttributeContainerMap,BaseHolder,BufferedResponseHandler,CachingSessionDataStore,ConfigurableSpnegoLoginService,ConnectionLimit,ConnectionStatistics,ConnectorStatistics,ConstraintSecurityHandler,ContainerLifeCycle,ContextHandler,ContextHandlerCollection,CustomRequestLog,DebugHandler,DebugListener,DefaultHandler,DefaultSessionCache,DefaultSessionIdManager,DetectorConnectionFactory,DuplexConnectionPool,ErrorHandler,ErrorPageErrorHandler,ExecutorSizedThreadPool,ExecutorThreadPool,FileBufferedResponseHandler,FileSessionDataStore,FilterHolder,GzipHandler,HandlerCollection,HandlerList,HandlerWrapper,HashLoginService,Holder,HotSwapHandler,HouseKeeper,HttpClient,HttpClientTransportOverHTTP,HttpConnectionFactory,HttpDestination,HttpDestinationOverHTTP,IdleTimeoutHandler,IncludeExcludeConnectionStatistics,InetAccessHandler,IPAccessHandler,JDBCLoginService,JDBCSessionDataStore,KeyStoreScanner,LeakDetector,LeakTrackingByteBufferPool,LeakTrackingConnectionPool,ListenerHolder,LocalConnector,LowResourceMonitor,ManagedSelector,MonitoredQueuedThreadPool,MovedContextHandler,MultiplexConnectionPool,MultiplexHttpDestination,NCSARequestLog,NegotiatingServerConnectionFactory,NetworkTrafficServerConnector,NullSessionCache,NullSessionDataStore,OptionalSslConnectionFactory,PathWatcher,PoolingHttpDestination,PropertyUserStore,ProxyConnectionFactory,QueuedThreadPool,RandomConnectionPool,RequestLogHandler,RequestLogWriter,ReservedThreadExecutor,ResourceHandler,RoundRobinConnectionPool,Scanner,ScheduledExecutorScheduler,ScopedHandler,SecuredRedirectHandler,SecurityHandler,SelectorManager,Server,ServerConnectionStatistics,ServerConnector,ServletContextHandler,ServletContextHandler.Initializer,ServletHandler,ServletHolder,SessionHandler,ShutdownHandler,SizeLimitHandler,Slf4jRequestLog,Slf4jRequestLogWriter,SpnegoLoginService,SslConnectionFactory,SslContextFactory,SslContextFactory.Client,SslContextFactory.Server,StatisticsHandler,StopLifeCycle,Sweeper,SymlinkAllowedResourceAliasChecker,ThreadLimitHandler,TimerScheduler,UserStore,ValidatingConnectionPool
@ManagedObject("Lifecycle Interface for startable components")
@Deprecated(since="2021-05-27")
public interface LifeCycle
Deprecated.
The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
The lifecycle interface for generic components.
Classes implementing this interface have a defined life cycle defined by the methods of this interface.
Classes implementing this interface have a defined life cycle defined by the methods of this interface.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLifeCycleListener(LifeCycle.Listener listener) Deprecated.booleanisFailed()Deprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.voidremoveLifeCycleListener(LifeCycle.Listener listener) Deprecated.voidstart()Deprecated.Starts the component.static voidDeprecated.Utility to start an object if it is a LifeCycle and to convert any exception thrown to aRuntimeExceptionvoidstop()Deprecated.Stops the component.static voidDeprecated.Utility to stop an object if it is a LifeCycle and to convert any exception thrown to aRuntimeException
-
Method Details
-
start
Deprecated.Starts the component.- Throws:
Exception- If the component fails to start- See Also:
-
stop
Deprecated.Stops the component. The component may wait for current activities to complete normally, but it can be interrupted.- Throws:
Exception- If the component fails to stop- See Also:
-
isRunning
boolean isRunning()Deprecated.- Returns:
- true if the component is starting or has been started.
-
isStarted
boolean isStarted()Deprecated.- Returns:
- true if the component has been started.
- See Also:
-
isStarting
boolean isStarting()Deprecated.- Returns:
- true if the component is starting.
- See Also:
-
isStopping
boolean isStopping()Deprecated.- Returns:
- true if the component is stopping.
- See Also:
-
isStopped
boolean isStopped()Deprecated.- Returns:
- true if the component has been stopped.
- See Also:
-
isFailed
boolean isFailed()Deprecated.- Returns:
- true if the component has failed to start or has failed to stop.
-
addLifeCycleListener
Deprecated. -
removeLifeCycleListener
Deprecated. -
start
Deprecated.Utility to start an object if it is a LifeCycle and to convert any exception thrown to aRuntimeException- Parameters:
object- The instance to start.- Throws:
RuntimeException- if the call to start throws an exception.
-
stop
Deprecated.Utility to stop an object if it is a LifeCycle and to convert any exception thrown to aRuntimeException- Parameters:
object- The instance to stop.- Throws:
RuntimeException- if the call to stop throws an exception.
-