當前位置: 首頁>>代碼示例>>Java>>正文


Java LifeCycle.Listener方法代碼示例

本文整理匯總了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);
}
 
開發者ID:soabase,項目名稱:soabase,代碼行數:25,代碼來源:MockApplication.java

示例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);
}
 
開發者ID:line,項目名稱:armeria,代碼行數:23,代碼來源:JettyServiceConfig.java

示例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();
}
 
開發者ID:line,項目名稱:armeria,代碼行數:25,代碼來源:JettyServiceConfig.java

示例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);
}
 
開發者ID:soabase,項目名稱:soabase,代碼行數:15,代碼來源:MockOldStyleApplication.java

示例5: lifeCycleListeners

import org.eclipse.jetty.util.component.LifeCycle; //導入方法依賴的package包/類
List<LifeCycle.Listener> lifeCycleListeners() {
    return lifeCycleListeners;
}
 
開發者ID:line,項目名稱:armeria,代碼行數:4,代碼來源:JettyServiceConfig.java

示例6: addLifecycleListener

import org.eclipse.jetty.util.component.LifeCycle; //導入方法依賴的package包/類
public void addLifecycleListener(LifeCycle.Listener listener) {
    server.addLifeCycleListener(listener);
}
 
開發者ID:NetsOSS,項目名稱:embedded-jetty,代碼行數:4,代碼來源:EmbeddedJettyBuilder.java


注:本文中的org.eclipse.jetty.util.component.LifeCycle.Listener方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。