本文整理了Java中javax.net.ssl.SSLServerSocket.close()
方法的一些代码示例,展示了SSLServerSocket.close()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SSLServerSocket.close()
方法的具体详情如下:
包路径:javax.net.ssl.SSLServerSocket
类名称:SSLServerSocket
方法名:close
暂无
代码示例来源:origin: wildfly/wildfly
public void close() throws IOException {
delegate.close();
}
代码示例来源:origin: cSploit/android
public void stop(){
Logger.debug("Stopping HTTPS redirector ...");
try{
if(mSocket != null)
mSocket.close();
}
catch(IOException e){ }
mRunning = false;
mSocket = null;
}
代码示例来源:origin: org.apache.logging.log4j/log4j-core
private void closeSockets() {
if(clientSocket != null) {
try {
clientSocket.close();
}
catch(final Exception e) {
e.printStackTrace();
}
}
if (serverSocket != null) {
try {
serverSocket.close();
} catch (final Exception e) {
e.printStackTrace();
}
}
}
代码示例来源:origin: org.apache.logging.log4j/log4j-core
@Override
public void shutdown() {
this.shutdown = true;
try {
try {
this.serverSocket.close();
}
catch (final Exception e) {
e.printStackTrace();
}
this.interrupt();
} catch (final Exception e) {
e.printStackTrace();
}
try {
thread.join(100);
} catch (InterruptedException ie) {
System.out.println("Shutdown of TLS server thread failed.");
}
}
代码示例来源:origin: i2p/i2p.i2p
public void implCloseSelectableChannel() throws IOException {
_socket.close();
}
代码示例来源:origin: apache/karaf
@Override
public void close() throws IOException {
ss.close();
}
代码示例来源:origin: org.wildfly.security/wildfly-elytron
public void close() throws IOException {
delegate.close();
}
代码示例来源:origin: perlundq/yajsync
@Override
public void close() throws IOException
{
_sslSocket.close();
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public void close() throws IOException {
delegate.close();
}
代码示例来源:origin: org.wildfly.security/wildfly-elytron-ssl
public void close() throws IOException {
delegate.close();
}
代码示例来源:origin: org.coosproject.messaging/messaging-j2se
/**
* Stops listening
* */
public void stop() throws Exception {
if (running) {
running = false;
serverSocket.close();
thread.interrupt();
// stopTransports();
}
}
代码示例来源:origin: org.coosproject.messaging/messaging-lib
/**
* Stops listening
* */
public void stop() throws Exception {
if (running) {
running = false;
serverSocket.close();
thread.interrupt();
stopTransports();
}
}
代码示例来源:origin: OpenAS2/OpenAs2App
@Override
public void destroy() throws Exception
{
if (logger.isTraceEnabled())
logger.trace("SocketCommandProcessor.destroy called...");
sslserversocket.close(); // closes remote session
super.destroy();
}
}
代码示例来源:origin: jsevellec/cassandra-unit
public static SSLServerSocket getServerSocket(EncryptionOptions options, InetAddress address, int port) throws IOException
{
SSLContext ctx = createSSLContext(options, true);
SSLServerSocket serverSocket = (SSLServerSocket)ctx.getServerSocketFactory().createServerSocket();
try
{
serverSocket.setReuseAddress(true);
prepareSocket(serverSocket, options);
serverSocket.bind(new InetSocketAddress(address, port), 500);
return serverSocket;
}
catch (IllegalArgumentException | SecurityException | IOException e)
{
serverSocket.close();
throw e;
}
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
public static SSLServerSocket getServerSocket(EncryptionOptions options, InetAddress address, int port) throws IOException
{
SSLContext ctx = createSSLContext(options, true);
SSLServerSocket serverSocket = (SSLServerSocket)ctx.getServerSocketFactory().createServerSocket();
try
{
serverSocket.setReuseAddress(true);
prepareSocket(serverSocket, options);
serverSocket.bind(new InetSocketAddress(address, port), 500);
return serverSocket;
}
catch (IllegalArgumentException | SecurityException | IOException e)
{
serverSocket.close();
throw e;
}
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
public static SSLServerSocket getServerSocket(EncryptionOptions options, InetAddress address, int port) throws IOException
{
SSLContext ctx = createSSLContext(options, true);
SSLServerSocket serverSocket = (SSLServerSocket)ctx.getServerSocketFactory().createServerSocket();
try
{
serverSocket.setReuseAddress(true);
prepareSocket(serverSocket, options);
serverSocket.bind(new InetSocketAddress(address, port), 500);
return serverSocket;
}
catch (IllegalArgumentException | SecurityException | IOException e)
{
serverSocket.close();
throw e;
}
}
代码示例来源:origin: komamitsu/fluency
@After
public void tearDown()
throws IOException
{
if (serverSocket != null) {
serverSocket.close();
}
}
代码示例来源:origin: osiegmar/logback-gelf
@Override
public void run() {
try (Socket socket = server.accept()) {
try (DataInputStream in = new DataInputStream(socket.getInputStream())) {
receivedData = ByteStreams.toByteArray(in);
}
} catch (final IOException e) {
throw new IllegalStateException(e);
}
try {
server.close();
} catch (final IOException e) {
throw new IllegalStateException(e);
}
semaphore.release();
}
代码示例来源:origin: perlundq/yajsync
@Override
public ServerChannel open(InetAddress address, int port, int timeout)
throws IOException
{
SSLServerSocket sock =
(SSLServerSocket) _factory.createServerSocket(port,
_backlog, address);
try {
sock.setReuseAddress(_isReuseAddress);
sock.setWantClientAuth(_isWantClientAuth);
return new SSLServerChannel(sock, timeout);
} catch (Throwable t) {
if (!sock.isClosed()) {
try {
sock.close();
} catch (Throwable tt) {
t.addSuppressed(tt);
}
}
throw t;
}
}
}
代码示例来源:origin: komamitsu/fluency
@After
public void tearDown()
throws IOException
{
if (sslServerSocket != null && !sslServerSocket.isClosed()) {
sslServerSocket.close();
}
}
内容来源于网络,如有侵权,请联系作者删除!