本文整理了Java中org.mortbay.jetty.Connector.close()
方法的一些代码示例,展示了Connector.close()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connector.close()
方法的具体详情如下:
包路径:org.mortbay.jetty.Connector
类名称:Connector
方法名:close
暂无
代码示例来源: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: org.apache.hama/hama-core
/**
* stop the server
*/
public void stop() throws Exception {
listener.close();
webServer.stop();
}
代码示例来源:origin: io.fabric8/fabric-hadoop
/**
* stop the server
*/
public void stop() throws Exception {
listener.close();
webServer.stop();
}
代码示例来源:origin: apache/hama
/**
* stop the server
*/
public void stop() throws Exception {
listener.close();
webServer.stop();
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/**
* stop the server
*/
public void stop() throws Exception {
listener.close();
webAppContext.clearAttributes();
webServer.removeHandler(webAppContext);
webServer.stop();
}
代码示例来源:origin: ch.cern.hadoop/hadoop-common
listener.close();
listener.open();
break;
代码示例来源:origin: io.hops/hadoop-common
listener.close();
listener.open();
break;
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
listener.close();
listener.open();
break;
代码示例来源:origin: org.apache.tajo/tajo-core
MultiException exception = null;
try {
listener.close();
} catch (Exception e) {
LOG.error(
代码示例来源:origin: apache/tajo
MultiException exception = null;
try {
listener.close();
} catch (Exception e) {
LOG.error(
代码示例来源:origin: io.hops/hadoop-common
li.listener.close();
} catch (Exception e) {
LOG.error(
代码示例来源:origin: io.hops/hadoop-common
listener.close();
listener.open();
LOG.info("Jetty bound to port " + listener.getLocalPort());
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
listener.close();
listener.open();
LOG.info("Jetty bound to port " + listener.getLocalPort());
代码示例来源:origin: io.hops/hadoop-common
listener.close();
listener.open();
LOG.info("Jetty bound to port " + listener.getLocalPort());
代码示例来源:origin: ch.cern.hadoop/hadoop-common
listener.close();
listener.open();
LOG.info("Jetty bound to port " + listener.getLocalPort());
代码示例来源:origin: ch.cern.hadoop/hadoop-common
for (Connector c : listeners) {
try {
c.close();
} catch (Exception e) {
LOG.error(
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
for (Connector c : listeners) {
try {
c.close();
} catch (Exception e) {
LOG.error(
代码示例来源:origin: io.hops/hadoop-common
for (Connector c : listeners) {
try {
c.close();
} catch (Exception e) {
LOG.error(
代码示例来源:origin: org.apache.slider/slider-core
private void openListeners() throws Exception {
// from HttpServer2.openListeners()
for (Connector listener : agentServer.getConnectors()) {
if (listener.getLocalPort() != -1) {
// This listener is either started externally or has been bound
continue;
}
int port = listener.getPort();
while (true) {
// jetty has a bug where you can't reopen a listener that previously
// failed to open w/o issuing a close first, even if the port is changed
try {
listener.close();
listener.open();
LOG.info("Jetty bound to port " + listener.getLocalPort());
break;
} catch (BindException ex) {
if (port == 0) {
BindException be = new BindException("Port in use: "
+ listener.getHost() + ":" + listener.getPort());
be.initCause(ex);
throw be;
}
}
// try the next port number
listener.setPort(++port);
Thread.sleep(100);
}
}
}
代码示例来源:origin: apache/incubator-slider
private void openListeners() throws Exception {
// from HttpServer2.openListeners()
for (Connector listener : agentServer.getConnectors()) {
if (listener.getLocalPort() != -1) {
// This listener is either started externally or has been bound
continue;
}
int port = listener.getPort();
while (true) {
// jetty has a bug where you can't reopen a listener that previously
// failed to open w/o issuing a close first, even if the port is changed
try {
listener.close();
listener.open();
LOG.info("Jetty bound to port " + listener.getLocalPort());
break;
} catch (BindException ex) {
if (port == 0) {
BindException be = new BindException("Port in use: "
+ listener.getHost() + ":" + listener.getPort());
be.initCause(ex);
throw be;
}
}
// try the next port number
listener.setPort(++port);
Thread.sleep(100);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!