org.eclipse.jetty.util.component
接口 LifeCycle

所有已知子接口:
AppProvider, Connector, Handler, HandlerContainer, RequestLog, Server.Graceful, SessionIdManager, SessionManager, SslConnector
所有已知实现类:
AbstractConnector, AbstractHandler, AbstractHandlerContainer, AbstractLeakPreventer, AbstractLifeCycle, AbstractNIOConnector, AbstractSessionIdManager, AbstractSessionManager, AggregateLifeCycle, Ajp13SocketConnector, AppContextLeakPreventer, AsyncNCSARequestLog, AWTLeakPreventer, BlockingChannelConnector, ConnectHandler, ConnectorServer, ConstraintSecurityHandler, ContextDeployer, ContextHandler, ContextHandlerCollection, ContextProvider, DataSourceLoginService, DebugHandler, DefaultHandler, DeploymentManager, DOMLeakPreventer, DriverManagerLeakPreventer, ErrorHandler, ErrorPageErrorHandler, ExecutorThreadPool, FilterHolder, GCThreadLeakPreventer, GzipHandler, HandlerCollection, HandlerList, HandlerWrapper, HashLoginService, HashSessionIdManager, HashSessionManager, Holder, HotSwapHandler, HttpBuffersImpl, HttpClient, HttpSpiContextHandler, InheritedChannelConnector, IPAccessHandler, JAASLoginService, Java2DLeakPreventer, JDBCLoginService, JDBCSessionIdManager, JDBCSessionManager, LDAPLeakPreventer, LocalConnector, LoginConfigurationLeakPreventer, MappedLoginService, MBeanContainer, MovedContextHandler, NCSARequestLog, NestedConnector, NetworkTrafficSelectChannelConnector, OverlayedAppProvider, PolicyMonitor, PropertyUserStore, ProxyHandler, QueuedThreadPool, RequestLogHandler, ResourceHandler, RewriteHandler, Scanner, ScanningAppProvider, ScopedHandler, SecurityHandler, SecurityProviderLeakPreventer, SelectChannelConnector, SelectorManager, Server, ServletContainerInitializerListener, ServletContextHandler, ServletHandler, ServletHandler, ServletHolder, SessionHandler, ShutdownHandler, SocketConnector, SpnegoLoginService, SslContextFactory, SslContextFactory, SslSelectChannelConnector, SslSocketConnector, StatisticsHandler, TemplateContext, ThreadMonitor, ThreadPoolExecutorAdapter, WebAppContext, WebAppDeployer, WebAppProvider, WebSocketClientFactory, WebSocketFactory, WebSocketHandler

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.


嵌套类摘要
static interface LifeCycle.Listener
          Listener.
 
方法摘要
 void addLifeCycleListener(LifeCycle.Listener listener)
           
 boolean isFailed()
           
 boolean isRunning()
           
 boolean isStarted()
           
 boolean isStarting()
           
 boolean isStopped()
           
 boolean isStopping()
           
 void removeLifeCycleListener(LifeCycle.Listener listener)
           
 void start()
          Starts the component.
 void stop()
          Stops the component.
 

方法详细信息

start

void start()
           throws Exception
Starts the component.

抛出:
Exception - If the component fails to start
另请参见:
isStarted(), stop(), isFailed()

stop

void stop()
          throws Exception
Stops the component. The component may wait for current activities to complete normally, but it can be interrupted.

抛出:
Exception - If the component fails to stop
另请参见:
isStopped(), start(), isFailed()

isRunning

boolean isRunning()
返回:
true if the component is starting or has been started.

isStarted

boolean isStarted()
返回:
true if the component has been started.
另请参见:
start(), isStarting()

isStarting

boolean isStarting()
返回:
true if the component is starting.
另请参见:
isStarted()

isStopping

boolean isStopping()
返回:
true if the component is stopping.
另请参见:
isStopped()

isStopped

boolean isStopped()
返回:
true if the component has been stopped.
另请参见:
stop(), isStopping()

isFailed

boolean isFailed()
返回:
true if the component has failed to start or has failed to stop.

addLifeCycleListener

void addLifeCycleListener(LifeCycle.Listener listener)

removeLifeCycleListener

void removeLifeCycleListener(LifeCycle.Listener listener)


Copyright © 2013. All Rights Reserved.