本文整理了Java中org.glassfish.grizzly.Transport.shutdownNow()
方法的一些代码示例,展示了Transport.shutdownNow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transport.shutdownNow()
方法的具体详情如下:
包路径:org.glassfish.grizzly.Transport
类名称:Transport
方法名:shutdownNow
[英]Forcibly stops the transport and closes all connections.
[中]强制停止传输并关闭所有连接。
代码示例来源:origin: javaee/grizzly
private void stopClientTransport() throws IOException {
if (clientTransport != null) {
final Transport localTransport = clientTransport;
clientTransport = null;
try {
localTransport.shutdownNow();
} catch (IOException ignored) {
}
}
}
代码示例来源:origin: javaee/grizzly
/**
* Stops the server.
*/
public void stop() throws IOException {
if (!isRunning) {
return;
}
final Transport localTransport = transport;
transport = null;
localTransport.shutdownNow();
}
}
代码示例来源:origin: eclipse-ee4j/tyrus
@Override
public void close() {
super.close();
try {
if (sharedTransport) {
connection.close();
} else {
connection.getTransport().shutdownNow();
}
} catch (IOException e) {
Logger.getLogger(GrizzlyClientFilter.class.getName())
.log(Level.INFO, "Exception thrown during shutdown.", e);
}
}
};
代码示例来源:origin: org.glassfish.tyrus/tyrus-container-grizzly-client
@Override
public void close() {
super.close();
try {
if (sharedTransport) {
connection.close();
} else {
connection.getTransport().shutdownNow();
}
} catch (IOException e) {
Logger.getLogger(GrizzlyClientFilter.class.getName())
.log(Level.INFO, "Exception thrown during shutdown.", e);
}
}
};
内容来源于网络,如有侵权,请联系作者删除!