Package org.eclipse.jetty.util.component
Interface LifeCycle
- All Known Subinterfaces:
AppProvider
,Connector
,Handler
,HandlerContainer
,NetworkConnector
,Scheduler
,ServletContextHandler.ServletContainerInitializerCaller
,SessionCache
,SessionDataMap
,SessionDataStore
,SessionIdManager
- All Known Implementing Classes:
AbstractConnectionFactory
,AbstractConnectionPool
,AbstractConnector
,AbstractConnectorHttpClientTransport
,AbstractContextProvider
,AbstractHandler
,AbstractHandler.ErrorDispatchHandler
,AbstractHandlerContainer
,AbstractHTTP2ServerConnectionFactory
,AbstractHTTP3ServerConnectionFactory
,AbstractHttpClientTransport
,AbstractLeakPreventer
,AbstractLifeCycle
,AbstractLoginService
,AbstractNetworkConnector
,AbstractSessionCache
,AbstractSessionDataStore
,AbstractWebAppProvider
,AcceptRateLimit
,AdaptiveExecutionStrategy
,AllowedResourceAliasChecker
,ALPNServerConnectionFactory
,AnnotationConfiguration.DiscoveredServletContainerInitializerHolder
,AntWebAppContext
,AntWebAppContext.AntServletHandler
,AntWebAppContext.AntServletHolder
,AppContextLeakPreventer
,AsyncDelayHandler
,AsyncRequestLogWriter
,AttributeContainerMap
,AWTLeakPreventer
,BaseHolder
,BufferedResponseHandler
,BundleContextProvider
,BundleWebAppProvider
,CachingSessionDataStore
,ClientConnectionFactory.Info
,ClientConnectionFactoryOverHTTP2
,ClientConnectionFactoryOverHTTP2.HTTP2
,ClientConnectionFactoryOverHTTP3
,ClientConnectionFactoryOverHTTP3.HTTP3
,ClientConnector
,ClientConnector.ClientSelectorManager
,ClientConnector.Configurator
,ClientProtocolSession
,ClientQuicSession
,CompressionPool
,ConfigurableSpnegoLoginService
,ConnectHandler
,ConnectHandler.ConnectManager
,ConnectionLimit
,ConnectionStatistics
,ConnectorServer
,ConstraintSecurityHandler
,ContainerLifeCycle
,ContextHandler
,ContextHandlerCollection
,CustomRequestLog
,DataSourceLoginService
,DebugHandler
,DebugListener
,DefaultHandler
,DefaultSessionCache
,DefaultSessionIdManager
,DeflaterPool
,DelegatingThreadPool
,DeploymentManager
,DetectorConnectionFactory
,DriverManagerLeakPreventer
,DuplexConnectionPool
,DuplexHttpDestination
,EatWhatYouKill
,ErrorHandler
,ErrorPageErrorHandler
,ExecutorThreadPool
,FileBufferedResponseHandler
,FileSessionDataStore
,FilterHolder
,GCloudSessionDataStore
,GzipHandler
,HandlerCollection
,HandlerList
,HandlerWrapper
,HashLoginService
,Holder
,HotSwapHandler
,HouseKeeper
,HTTP2Client
,HTTP2ClientSession
,HTTP2CServerConnectionFactory
,HTTP2ServerConnectionFactory
,HTTP2ServerSession
,HTTP2Session
,HTTP3Client
,HTTP3ServerConnectionFactory
,HTTP3ServerConnector
,HttpClient
,HttpClientTransportDynamic
,HttpClientTransportOverFCGI
,HttpClientTransportOverHTTP
,HttpClientTransportOverHTTP2
,HttpClientTransportOverHTTP3
,HttpClientTransportOverUnixSockets
,HttpConnectionFactory
,HttpDestination
,HttpSpiContextHandler
,IdleTimeoutHandler
,IncludeExcludeConnectionStatistics
,InetAccessHandler
,InfinispanSessionDataStore
,InflaterPool
,JAASLoginService
,JavaxWebSocketClientContainer
,JavaxWebSocketContainer
,JavaxWebSocketServerContainer
,JavaxWebSocketShutdownContainer
,JDBCLoginService
,JDBCSessionDataStore
,JettyServerFrameHandlerFactory
,JettyWebSocketFrameHandlerFactory
,JettyWebSocketServerContainer
,KeyStoreScanner
,LeakDetector
,LeakTrackingByteBufferPool
,LeakTrackingConnectionPool
,ListenerHolder
,LocalConnector
,LowResourceMonitor
,ManagedSelector
,MemcachedSessionDataMap
,MongoSessionDataStore
,MonitoredQueuedThreadPool
,MovedContextHandler
,MultiplexConnectionPool
,MultiplexHttpDestination
,NegotiatingServerConnectionFactory
,NetworkTrafficServerConnector
,NoSqlSessionDataStore
,NullSessionCache
,NullSessionDataStore
,OpenIdConfiguration
,OpenIdLoginService
,OptionalSslConnectionFactory
,PathWatcher
,PropertyUserStore
,PropertyUserStoreManager
,ProtocolSession
,ProxyConnectionFactory
,QueuedThreadPool
,QuicClientConnectorConfigurator
,QuicServerConnector
,QuicSession
,QuicSessionContainer
,RandomConnectionPool
,RawHTTP2ServerConnectionFactory
,RawHTTP3ServerConnectionFactory
,RequestLogHandler
,RequestLogWriter
,ReservedThreadExecutor
,ResourceHandler
,RewriteHandler
,RoundRobinConnectionPool
,Scanner
,ScanningAppProvider
,ScheduledExecutorScheduler
,ScopedHandler
,SecuredRedirectHandler
,SecurityHandler
,SelectorManager
,Server
,ServerConnectionStatistics
,ServerConnector
,ServerConnector.ServerConnectorManager
,ServerFCGIConnectionFactory
,ServerProtocolSession
,ServerQuicSession
,ServiceContextProvider
,ServiceWebAppProvider
,ServletContainerInitializerHolder
,ServletContainerInitializersStarter
,ServletContextHandler
,ServletContextHandler.Initializer
,ServletContextHandler.ServletContainerInitializerStarter
,ServletHandler
,ServletHolder
,ServletTester
,SessionHandler
,SessionTracker
,SessionTracker
,ShutdownHandler
,Slf4jRequestLogWriter
,SslConnectionFactory
,SslContextFactory
,SslContextFactory.Client
,SslContextFactory.Server
,StatisticsHandler
,StopLifeCycle
,Sweeper
,SymlinkAllowedResourceAliasChecker
,ThreadLimitHandler
,TimerScheduler
,UnixSocketConnector
,UnixSocketConnector.UnixSocketConnectorManager
,UserStore
,ValidatingConnectionPool
,WebAppContext
,WebAppProvider
,WebSocketClient
,WebSocketComponents
,WebSocketCoreClient
,WebSocketServerComponents
,WebSocketUpgradeHandler
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addEventListener
(EventListener listener) boolean
isFailed()
boolean
boolean
boolean
boolean
boolean
boolean
removeEventListener
(EventListener listener) void
start()
Starts the component.static void
Utility to start an object if it is a LifeCycle and to convert any exception thrown to aRuntimeException
void
stop()
Stops the component.static void
Utility to stop an object if it is a LifeCycle and to convert any exception thrown to aRuntimeException
-
Method Details
-
start
Starts the component.- Throws:
Exception
- If the component fails to start- See Also:
-
start
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
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:
-
stop
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.
-
isRunning
boolean isRunning()- Returns:
- true if the component is starting or has been started.
-
isStarted
boolean isStarted()- Returns:
- true if the component has been started.
- See Also:
-
isStarting
boolean isStarting()- Returns:
- true if the component is starting.
- See Also:
-
isStopping
boolean isStopping()- Returns:
- true if the component is stopping.
- See Also:
-
isStopped
boolean isStopped()- Returns:
- true if the component has been stopped.
- See Also:
-
isFailed
boolean isFailed()- Returns:
- true if the component has failed to start or has failed to stop.
-
addEventListener
-
removeEventListener
-