org.eclipse.jetty.server.Handler.isStarted()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(168)

本文整理了Java中org.eclipse.jetty.server.Handler.isStarted()方法的一些代码示例,展示了Handler.isStarted()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Handler.isStarted()方法的具体详情如下:
包路径:org.eclipse.jetty.server.Handler
类名称:Handler
方法名:isStarted

Handler.isStarted介绍

暂无

代码示例

代码示例来源:origin: igniterealtime/Openfire

/**
 * Adds a Jetty handler to be added to the embedded web server that is used to expose BOSH (HTTP-bind)
 * functionality.
 *
 * @param handler The handler (cannot be null).
 */
public void addJettyHandler( Handler handler )
{
  if ( handler == null )
  {
    throw new IllegalArgumentException( "Argument 'handler' cannot be null." );
  }
  extensionHandlers.addHandler( handler );
  if ( !handler.isStarted() && extensionHandlers.isStarted() )
  {
    try
    {
      handler.start();
    }
    catch ( Exception e )
    {
      Log.warn( "Unable to start handler {}", handler, e );
    }
  }
}

代码示例来源:origin: igniterealtime/Openfire

/**
 * Removes a Jetty handler to be added to the embedded web server that is used to expose BOSH (HTTP-bind)
 * functionality.
 *
 * Removing a handler, even when null, or non-existing, might have side-effects as introduced by the Jetty
 * implementation. At the time of writing, Jetty will re
 *
 * @param handler The handler (should not be null).
 */
public void removeJettyHandler( Handler handler )
{
  if (handler instanceof WebAppContext) {
    // A work-around of the Jetty bug described at https://github.com/eclipse/jetty.project/issues/1425
    // NOTE: According to some comments on WebAppLoaderFix, this may stop working on Java 9.
    // Hopefully the Jetty team will have fixed the underlying bug by then
    WebAppLoaderFix.checkAndClose(((WebAppContext) handler).getClassLoader());
  }
  extensionHandlers.removeHandler( handler );
  if ( handler.isStarted() )
  {
    try
    {
      handler.stop();
    }
    catch ( Exception e )
    {
      Log.warn( "Unable to stop the handler that was removed: {}", handler, e );
    }
  }
}

代码示例来源:origin: org.apache.calcite.avatica/avatica-server

@Override public boolean isStarted() {
 return handler.isStarted();
}

代码示例来源:origin: apache/calcite-avatica

@Override public boolean isStarted() {
 return handler.isStarted();
}

代码示例来源:origin: jenkinsci/winstone

@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
  Handler handler=_handler;
  if (handler != null && isStarted() && handler.isStarted())
  {
    handler.handle(target,baseRequest,request,response);
  }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server

@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
  Handler handler=_handler;
  if (handler != null && isStarted() && handler.isStarted())
  {
    handler.handle(target,baseRequest,request,response);
  }
}

代码示例来源:origin: org.igniterealtime.openfire/xmppserver

/**
 * Removes a Jetty handler to be added to the embedded web server that is used to expose BOSH (HTTP-bind)
 * functionality.
 *
 * Removing a handler, even when null, or non-existing, might have side-effects as introduced by the Jetty
 * implementation. At the time of writing, Jetty will re
 *
 * @param handler The handler (should not be null).
 */
public void removeJettyHandler( Handler handler )
{
  extensionHandlers.removeHandler( handler );
  if ( handler.isStarted() )
  {
    try
    {
      handler.stop();
    }
    catch ( Exception e )
    {
      Log.warn( "Unable to stop the handler that was removed: {}", handler, e );
    }
  }
}

代码示例来源:origin: io.gravitee.am.gateway/gravitee-am-gateway-jetty

private void removeHandler(Domain domain) {
  Handler handler = getInternalHandler(domain);
  if (handler != null && handler.isStarted()) {
    try {
      logger.info("Stopping handler for {}: {}", domain.getName(), handler);
      handler.stop();
    } catch (Exception ex) {
      logger.error("Unable to stop an handler", ex);
    }
    parent.unmanage(handler);
    parent.removeHandler(handler);
  }
}

代码示例来源:origin: gravitee-io/graviteeio-access-management

private void removeHandler(Domain domain) {
  Handler handler = getInternalHandler(domain);
  if (handler != null && handler.isStarted()) {
    try {
      logger.info("Stopping handler for {}: {}", domain.getName(), handler);
      handler.stop();
    } catch (Exception ex) {
      logger.error("Unable to stop an handler", ex);
    }
    parent.unmanage(handler);
    parent.removeHandler(handler);
  }
}

代码示例来源:origin: org.igniterealtime.openfire/xmppserver

/**
 * Adds a Jetty handler to be added to the embedded web server that is used to expose BOSH (HTTP-bind)
 * functionality.
 *
 * @param handler The handler (cannot be null).
 */
public void addJettyHandler( Handler handler )
{
  if ( handler == null )
  {
    throw new IllegalArgumentException( "Argument 'handler' cannot be null." );
  }
  extensionHandlers.addHandler( handler );
  if ( !handler.isStarted() && extensionHandlers.isStarted() )
  {
    try
    {
      handler.start();
    }
    catch ( Exception e )
    {
      Log.warn( "Unable to start handler {}", handler, e );
    }
  }
}

代码示例来源:origin: io.gravitee.am.management/gravitee-am-management-api-jetty

private void removeHandler(Domain domain) {
  Handler handler = getInternalHandler(domain);
  if (handler != null && handler.isStarted()) {
    try {
      logger.info("Stopping handler for {}: {}", domain.getName(), handler);
      handler.stop();
    } catch (Exception ex) {
      logger.error("Unable to stop an handler", ex);
    }
    parent.unmanage(handler);
    parent.removeHandler(handler);
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

if (old_handlers[i].isStarted())
  old_handlers[i].stop();

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

if (old_handlers[i].isStarted())
  old_handlers[i].stop();

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

if (old_handlers[i].isStarted())
  old_handlers[i].stop();

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server

if (old_handlers[i].isStarted())
  old_handlers[i].stop();

代码示例来源:origin: org.eclipse.jetty/server

if (old_handlers[i].isStarted())
  old_handlers[i].stop();

代码示例来源:origin: org.ops4j.pax.web/pax-web-jetty

if (!serverHandler.isStarted() && !serverHandler.isStarting()) {
  serverHandler.start();

相关文章