org.mortbay.jetty.Server.stop()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(105)

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

Server.stop介绍

暂无

代码示例

代码示例来源:origin: twitter/ambrose

/**
  * Stop the server.
  */
 public void stop() {
  if (server != null) {
   try {
    server.stop();
   } catch (Exception e) {
    LOG.warn("Error stopping Jetty server", e);
   }
  }
 }
}

代码示例来源:origin: Netflix/eureka

public void stop() throws Exception {
  server.stop();
}

代码示例来源:origin: pentaho/pentaho-kettle

public void stop() throws IOException {
 if ( this.server != null ) {
  try {
   this.server.stop();
  } catch ( Exception var2 ) {
   Throwables.propagateIfPossible( var2 );
   throw new IOException( var2 );
  }
  this.server = null;
 }
}

代码示例来源:origin: Netflix/eureka

public void stop() throws Exception {
  server.stop();
  server = null;
  port = 0;
  registrationStatusesQueue.clear();
  registrationStatuses.clear();
  applicationMap.clear();
  remoteRegionApps.clear();
  remoteRegionAppsDelta.clear();
  applicationDeltaMap.clear();
}

代码示例来源:origin: soabase/exhibitor

@Override
public void close() throws IOException
{
  if ( isClosed.compareAndSet(false, true) )
  {
    log.info("Shutting down");
    CloseableUtils.closeQuietly(exhibitor);
    try
    {
      server.stop();
    }
    catch ( Exception e )
    {
      log.error("Error shutting down Jetty", e);
    }
    server.destroy();
  }
}

代码示例来源:origin: azkaban/azkaban

public void close() {
 try {
  for (final ObjectName name : this.registeredMBeans) {
   this.mbeanServer.unregisterMBean(name);
   logger.info("Jmx MBean " + name.getCanonicalName() + " unregistered.");
  }
 } catch (final Exception e) {
  logger.error("Failed to cleanup MBeanServer", e);
 }
 this.scheduleManager.shutdown();
 this.executorManagerAdapter.shutdown();
 try {
  this.server.stop();
 } catch (final Exception e) {
  // Catch all while closing server
  logger.error(e);
 }
 this.server.destroy();
}

代码示例来源:origin: tjake/Solandra

public void stop() throws Exception
{
 if( server.isRunning() ) {
  server.stop();
  server.join();
 }
}

代码示例来源:origin: voldemort/voldemort

@Override
public void stopInner() {
  try {
    if(httpServer != null) {
      httpServer.stop();
      for(Connector c: httpServer.getConnectors()) {
        c.close();
      }
    }
    if(context != null)
      context.destroy();
  } catch(Exception e) {
    throw new VoldemortException(e);
  }
  this.httpServer = null;
  this.context = null;
}

代码示例来源:origin: voldemort/voldemort

@Override
@After
public void tearDown() throws Exception {
  httpStore.close();
  server.stop();
  context.destroy();
  VoldemortIOUtils.closeQuietly(httpClient);
}

代码示例来源:origin: voldemort/voldemort

@Override
public void tearDown() throws Exception {
  super.tearDown();
  httpStore.close();
  server.stop();
  context.destroy();
  VoldemortIOUtils.closeQuietly(httpClient);
}

代码示例来源:origin: rhuss/jolokia

/**
 * Stop the internal HTTP server
 *
 * @throws StopException when stopping fails
 */
public void stop() throws StopException {
  try {
    server.stop();
  } catch (Exception e) {
    throw new StopException(e, parent);
  }
}

代码示例来源:origin: mapsforge/mapsforge

@After
public final void afterTest() throws Exception {
  try {
    this.server.stop();
    this.server.join();
  } finally {
    FileUtils.deleteDirectory(this.httpRoot);
  }
}

代码示例来源:origin: org.apache.hadoop/avro

@Override
 public void close() {
  try {
   server.stop();
  } catch (Exception e) {
   throw new AvroRuntimeException(e);
  }
 }
}

代码示例来源:origin: info.aduna.commons/aduna-commons-net-http-server-embedded

public void stop()
  throws Exception
{
  jetty.stop();
  System.clearProperty("org.mortbay.log.class");
}

代码示例来源:origin: org.apache.slider/slider-core

public void close() throws IOException{
 //need to stop server and reset injector
 try {
  agentServer.stop();
 } catch (IOException e) {
  throw e;
 } catch (Exception e) {
  throw new IOException(e.toString(), e);
 }
}

代码示例来源:origin: org.codehaus.xfire/xfire-core

public void stop()
  throws Exception
{
  if (isStarted())
  {
    httpServer.stop();
    httpServer = null;
  }
}

代码示例来源:origin: net.disy.legato/legato-testing

private void doStop() throws Exception {
 // destroyRequest();
 server.stop();
 waitUntilStopped();
}

代码示例来源:origin: org.apache.tomee/openejb-http

@Override
  public void stop() throws ServiceException {
    try {
      server.stop();
    } catch (Exception e) {
      throw new ServiceException(e);
    }
  }
}

代码示例来源:origin: org.apache.axis2/axis2-transport-testkit

@TearDown @SuppressWarnings("unused")
  private void tearDown() throws Exception {
    server.stop();
  }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-jobclient

private void stopHttpServer() throws Exception {
 if (webServer != null) {
  webServer.stop();
  webServer.destroy();
  webServer = null;
 }
}

相关文章