Interface LifeCycle

All Known Subinterfaces:
AppProvider, Connector, Handler, Handler.Collection, Handler.Container, Handler.Singleton, HandlerContainer, NetworkConnector, ResourceFactory.LifeCycle, Scheduler, ServletContextHandler.ServletContainerInitializerCaller, SessionCache, SessionDataMap, SessionDataStore, SessionIdManager, SessionManager
All Known Implementing Classes:
AbstractConnectionFactory, AbstractConnectionPool, AbstractConnector, AbstractConnectorHttpClientTransport, AbstractContextProvider, AbstractHandler, AbstractHandlerContainer, AbstractHTTP2ServerConnectionFactory, AbstractHTTP3ServerConnectionFactory, AbstractHttpClientTransport, AbstractLeakPreventer, AbstractLifeCycle, AbstractLoginService, AbstractNetworkConnector, AbstractSessionCache, AbstractSessionDataStore, AbstractSessionManager, AcceptRateLimit, AdaptiveExecutionStrategy, AllowedResourceAliasChecker, ALPNServerConnectionFactory, AnnotationConfiguration.DiscoveredServletContainerInitializerHolder, AppContextLeakPreventer, AsyncRequestLogWriter, AttributeContainerMap, AWTLeakPreventer, BaseHolder, BufferedResponseHandler, BundleContextProvider, BundleWebAppProvider, CachingSessionDataStore, ClientConnectionFactory.Info, ClientConnectionFactoryOverHTTP2, ClientConnectionFactoryOverHTTP2.HTTP2, ClientConnectionFactoryOverHTTP3, ClientConnectionFactoryOverHTTP3.HTTP3, ClientConnector, ClientConnector.ClientSelectorManager, ClientConnector.Configurator, ClientHTTP3Session, ClientProtocolSession, ClientQuicConfiguration, ClientQuicSession, CompressionPool, ConditionalHandler, ConditionalHandler.Abstract, ConditionalHandler.DontHandle, ConditionalHandler.ElseNext, ConditionalHandler.Reject, ConditionalHandler.SkipNext, ConnectHandler, ConnectHandler.ConnectManager, ConnectionLimit, ConnectionStatistics, ConnectorServer, ConstraintSecurityHandler, ContainerLifeCycle, ContextHandler, ContextHandlerCollection, ContextProvider, CrossOriginHandler, CustomRequestLog, DataSourceLoginService, DebugHandler, DebugListener, DefaultHandler, DefaultSessionCache, DefaultSessionIdManager, DeflaterPool, DelayedHandler, DelegatingThreadPool, DeploymentManager, DetectorConnectionFactory, DriverManagerLeakPreventer, DuplexConnectionPool, EagerFormHandler, EatWhatYouKill, EventsHandler, ExecutorThreadPool, FastCGIProxyHandler, FileSessionDataStore, FilterHolder, GracefulHandler, GzipHandler, Handler.Abstract, Handler.Abstract.NonBlocking, Handler.AbstractContainer, Handler.Sequence, Handler.Wrapper, HashLoginService, Holder, HotSwapHandler, HouseKeeper, HTTP2Client, HTTP2ClientSession, HTTP2CServerConnectionFactory, HTTP2ServerConnectionFactory, HTTP2ServerSession, HTTP2Session, HTTP3Client, HTTP3ServerConnectionFactory, HTTP3ServerConnector, HTTP3Session, HTTP3SessionClient, HttpClient, HttpClientConnectionFactory.HTTP11, HttpClientTransportDynamic, HttpClientTransportOverFCGI, HttpClientTransportOverHTTP, HttpClientTransportOverHTTP2, HttpClientTransportOverHTTP3, HttpConnectionFactory, HttpDestination, HttpSpiContextHandler, IdleTimeoutHandler, IncludeExcludeConnectionStatistics, InetAccessHandler, InflaterPool, JAASLoginService, JakartaWebSocketClientContainer, JakartaWebSocketContainer, JakartaWebSocketServerContainer, JDBCLoginService, JDBCSessionDataStore, JettyServerFrameHandlerFactory, JettyWebSocketFrameHandlerFactory, JettyWebSocketServerContainer, KeyStoreScanner, LatencyRecordingHandler, ListenerHolder, LocalConnector, LowResourceMonitor, ManagedSelector, MemoryConnector, MonitoredQueuedThreadPool, MovedContextHandler, MultiplexConnectionPool, NegotiatingServerConnectionFactory, NetworkTrafficServerConnector, NullSessionCache, NullSessionDataStore, ObjectStreamSessionDataStore, OpenIdConfiguration, OpenIdLoginService, OptionalSslConnectionFactory, PathMappingsHandler, PropertyUserStore, PropertyUserStoreManager, ProtocolSession, ProxyConnectionFactory, ProxyHandler, ProxyHandler.Forward, ProxyHandler.Reverse, QoSHandler, QueuedThreadPool, QuicClientConnectorConfigurator, QuicConfiguration, QuicServerConnectionFactory, QuicServerConnector, QuicSession, QuicSessionContainer, RandomConnectionPool, RawHTTP2ServerConnectionFactory, RawHTTP3ServerConnectionFactory, RequestLogWriter, ReservedThreadExecutor, ResourceHandler, ResourceHandler.ResourceContext, RewriteHandler, RoundRobinConnectionPool, Scanner, ScanningAppProvider, ScheduledExecutorScheduler, SecuredRedirectHandler, SecurityHandler, SecurityHandler.PathMapped, SelectorManager, Server, ServerConnector, ServerConnector.ServerConnectorManager, ServerFCGIConnectionFactory, ServerFrameHandlerFactory, ServerProtocolSession, ServerQuicConfiguration, ServerQuicSession, ServerWebSocketContainer, ServletContainerInitializerHolder, ServletContextHandler, ServletContextHandler.ServletContainerInitializerStarter, ServletHandler, ServletHolder, ServletTester, SessionHandler, SessionHandler, SessionTracker, SessionTracker, ShutdownHandler, SizeLimitHandler, Slf4jRequestLogWriter, SPNEGOLoginService, SslConnectionFactory, SslContextFactory, SslContextFactory.Client, SslContextFactory.Server, StateTrackingHandler, StatisticsHandler, StatisticsHandler.MinimumDataRateHandler, StopLifeCycle, Sweeper, SymlinkAllowedResourceAliasChecker, ThreadLimitHandler, TimerScheduler, TrailingSlashAliasChecker, TryPathsHandler, UnixDomainServerConnector, UnixDomainServerConnector.UnixDomainSelectorManager, UserStore, ValidatingConnectionPool, VirtualThreadPool, WebAppContext, WebSocketClient, WebSocketComponents, WebSocketCoreClient, WebSocketServerComponents, WebSocketUpgradeHandler, WebSocketUpgradeHandler

@ManagedObject("Lifecycle Interface for startable components") public interface LifeCycle
The lifecycle interface for generic components.
Classes implementing this interface have a defined life cycle defined by the methods of this interface.
  • Method Details

    • start

      @ManagedOperation(value="Starts the instance", impact="ACTION") void start() throws Exception
      Starts the component.
      Throws:
      Exception - If the component fails to start
      See Also:
    • start

      static void start(Object object)
      Utility to start an object if it is a LifeCycle and to convert any exception thrown to a RuntimeException
      Parameters:
      object - The instance to start.
      Throws:
      RuntimeException - if the call to start throws an exception.
    • stop

      @ManagedOperation(value="Stops the instance", impact="ACTION") void stop() throws Exception
      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

      static void stop(Object object)
      Utility to stop an object if it is a LifeCycle and to convert any exception thrown to a RuntimeException
      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

      boolean addEventListener(EventListener listener)
    • removeEventListener

      boolean removeEventListener(EventListener listener)