本文整理匯總了Java中org.eclipse.jetty.util.component.LifeCycle.Listener方法的典型用法代碼示例。如果您正苦於以下問題:Java LifeCycle.Listener方法的具體用法?Java LifeCycle.Listener怎麽用?Java LifeCycle.Listener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jetty.util.component.LifeCycle
的用法示例。
在下文中一共展示了LifeCycle.Listener方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: run
import org.eclipse.jetty.util.component.LifeCycle; //導入方法依賴的package包/類
@Override
public void run(MockConfiguration configuration, Environment environment) throws Exception
{
AbstractBinder abstractBinder = new AbstractBinder()
{
@Override
protected void configure()
{
bind(new MockHK2Injected()).to(MockHK2Injected.class);
}
};
environment.jersey().register(abstractBinder);
environment.jersey().register(MockResource.class);
LifeCycle.Listener listener = new AbstractLifeCycle.AbstractLifeCycleListener()
{
@Override
public void lifeCycleStarted(LifeCycle event)
{
System.out.println("Starting...");
startedLatch.countDown();
}
};
environment.lifecycle().addLifeCycleListener(listener);
}
示例2: JettyServiceConfig
import org.eclipse.jetty.util.component.LifeCycle; //導入方法依賴的package包/類
JettyServiceConfig(String hostname,
Boolean dumpAfterStart, Boolean dumpBeforeStop, Long stopTimeoutMillis,
Handler handler, RequestLog requestLog,
Function<? super Server, ? extends SessionIdManager> sessionIdManagerFactory,
Map<String, Object> attrs, List<Bean> beans, List<HandlerWrapper> handlerWrappers,
List<Listener> eventListeners, List<LifeCycle.Listener> lifeCycleListeners,
List<Consumer<? super Server>> configurators) {
this.hostname = hostname;
this.dumpAfterStart = dumpAfterStart;
this.dumpBeforeStop = dumpBeforeStop;
this.stopTimeoutMillis = stopTimeoutMillis;
this.handler = handler;
this.requestLog = requestLog;
this.sessionIdManagerFactory = sessionIdManagerFactory;
this.attrs = Collections.unmodifiableMap(attrs);
this.beans = Collections.unmodifiableList(beans);
this.handlerWrappers = Collections.unmodifiableList(handlerWrappers);
this.eventListeners = Collections.unmodifiableList(eventListeners);
this.lifeCycleListeners = Collections.unmodifiableList(lifeCycleListeners);
this.configurators = Collections.unmodifiableList(configurators);
}
示例3: toString
import org.eclipse.jetty.util.component.LifeCycle; //導入方法依賴的package包/類
static String toString(
Object holder, String hostname, Boolean dumpAfterStart, Boolean dumpBeforeStop, Long stopTimeout,
Handler handler, RequestLog requestLog,
Function<? super Server, ? extends SessionIdManager> sessionIdManagerFactory,
Map<String, Object> attrs, List<Bean> beans, List<HandlerWrapper> handlerWrappers,
List<Listener> eventListeners, List<LifeCycle.Listener> lifeCycleListeners,
List<Consumer<? super Server>> configurators) {
return MoreObjects.toStringHelper(holder)
.add("hostname", hostname)
.add("dumpAfterStart", dumpAfterStart)
.add("dumpBeforeStop", dumpBeforeStop)
.add("stopTimeoutMillis", stopTimeout)
.add("handler", handler)
.add("requestLog", requestLog)
.add("sessionIdManagerFactory", sessionIdManagerFactory)
.add("attrs", attrs)
.add("beans", beans)
.add("handlerWrappers", handlerWrappers)
.add("eventListeners", eventListeners)
.add("lifeCycleListeners", lifeCycleListeners)
.add("configurators", configurators)
.toString();
}
示例4: run
import org.eclipse.jetty.util.component.LifeCycle; //導入方法依賴的package包/類
@Override
public void run(Configuration configuration, Environment environment) throws Exception
{
LifeCycle.Listener listener = new AbstractLifeCycle.AbstractLifeCycleListener()
{
@Override
public void lifeCycleStarted(LifeCycle event)
{
System.out.println("Starting...");
startedLatch.countDown();
}
};
environment.lifecycle().addLifeCycleListener(listener);
}
示例5: lifeCycleListeners
import org.eclipse.jetty.util.component.LifeCycle; //導入方法依賴的package包/類
List<LifeCycle.Listener> lifeCycleListeners() {
return lifeCycleListeners;
}
示例6: addLifecycleListener
import org.eclipse.jetty.util.component.LifeCycle; //導入方法依賴的package包/類
public void addLifecycleListener(LifeCycle.Listener listener) {
server.addLifeCycleListener(listener);
}