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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
LifeCycle.Listener
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addLifeCycleListener(LifeCycle.Listener listener)
Deprecated.boolean
isFailed()
Deprecated.boolean
isRunning()
Deprecated.boolean
isStarted()
Deprecated.boolean
isStarting()
Deprecated.boolean
isStopped()
Deprecated.boolean
isStopping()
Deprecated.void
removeLifeCycleListener(LifeCycle.Listener listener)
Deprecated.void
start()
Deprecated.Starts the component.static void
start(java.lang.Object object)
Deprecated.Utility to start an object if it is a LifeCycle and to convert any exception thrown to aRuntimeException
void
stop()
Deprecated.Stops the component.static void
stop(java.lang.Object object)
Deprecated.Utility to stop an object if it is a LifeCycle and to convert any exception thrown to aRuntimeException
-
-
-
Method Detail
-
start
@ManagedOperation(value="Starts the instance", impact="ACTION") void start() throws java.lang.Exception
Deprecated.Starts the component.- Throws:
java.lang.Exception
- If the component fails to start- See Also:
isStarted()
,stop()
,isFailed()
-
stop
@ManagedOperation(value="Stops the instance", impact="ACTION") void stop() throws java.lang.Exception
Deprecated.Stops the component. The component may wait for current activities to complete normally, but it can be interrupted.- Throws:
java.lang.Exception
- If the component fails to stop- See Also:
isStopped()
,start()
,isFailed()
-
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:
start()
,isStarting()
-
isStarting
boolean isStarting()
Deprecated.- Returns:
- true if the component is starting.
- See Also:
isStarted()
-
isStopping
boolean isStopping()
Deprecated.- Returns:
- true if the component is stopping.
- See Also:
isStopped()
-
isStopped
boolean isStopped()
Deprecated.- Returns:
- true if the component has been stopped.
- See Also:
stop()
,isStopping()
-
isFailed
boolean isFailed()
Deprecated.- Returns:
- true if the component has failed to start or has failed to stop.
-
addLifeCycleListener
void addLifeCycleListener(LifeCycle.Listener listener)
Deprecated.
-
removeLifeCycleListener
void removeLifeCycleListener(LifeCycle.Listener listener)
Deprecated.
-
start
static void start(java.lang.Object object)
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:
java.lang.RuntimeException
- if the call to start throws an exception.
-
stop
static void stop(java.lang.Object object)
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:
java.lang.RuntimeException
- if the call to stop throws an exception.
-
-