本文整理了Java中javax.net.ssl.SSLEngine.closeOutbound()
方法的一些代码示例,展示了SSLEngine.closeOutbound()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SSLEngine.closeOutbound()
方法的具体详情如下:
包路径:javax.net.ssl.SSLEngine
类名称:SSLEngine
方法名:closeOutbound
[英]Notifies this engine instance that no more outbound application data will be sent to this engine.
[中]通知此引擎实例不再向此引擎发送出站应用程序数据。
代码示例来源:origin: redisson/redisson
@Override
public void closeOutbound() {
engine.closeOutbound();
}
代码示例来源:origin: wildfly/wildfly
@Override
public void closeOutbound() {
engine.closeOutbound();
}
代码示例来源:origin: wildfly/wildfly
@Override
public void closeOutbound() {
delegate.closeOutbound();
}
代码示例来源:origin: igniterealtime/Openfire
/**
* Signals that no more outbound application data will be sent on this TLSHandler.
*
* @throws SSLException
*/
public void close() throws SSLException {
// Indicate that application is done with engine
tlsEngine.closeOutbound();
}
代码示例来源:origin: wildfly/wildfly
@Override
public void closeOutbound() {
delegate.closeOutbound();
}
代码示例来源:origin: wildfly/wildfly
public void closeOutbound() {
delegate.closeOutbound();
}
代码示例来源:origin: wildfly/wildfly
public void closeOutbound() {
currentRef.get().closeOutbound();
}
代码示例来源:origin: wildfly/wildfly
public void closeOutbound() {
currentRef.get().closeOutbound();
}
代码示例来源:origin: wildfly/wildfly
public void closeOutbound() {
currentRef.get().closeOutbound();
}
代码示例来源:origin: apache/kafka
void close() {
sslEngine.closeOutbound();
try {
sslEngine.closeInbound();
} catch (Exception e) {
// ignore
}
}
}
代码示例来源:origin: apache/activemq
/**
* close this stream
*
* @throws IOException
*/
@Override
public void close() throws IOException {
super.close();
if (engine != null) {
engine.closeOutbound();
}
closed = true;
}
代码示例来源:origin: TooTallNate/Java-WebSocket
public void close() throws IOException {
sslEngine.closeOutbound();
sslEngine.getSession().invalidate();
if( socketChannel.isOpen() )
socketChannel.write( wrap( emptybuffer ) );// FIXME what if not all bytes can be written
socketChannel.close();
}
代码示例来源:origin: TooTallNate/Java-WebSocket
/**
* This method should be called when this peer wants to explicitly close the connection
* or when a close message has arrived from the other peer, in order to provide an orderly shutdown.
* <p/>
* It first calls {@link SSLEngine#closeOutbound()} which prepares this peer to send its own close message and
* sets {@link SSLEngine} to the <code>NEED_WRAP</code> state. Then, it delegates the exchange of close messages
* to the handshake method and finally, it closes socket channel.
*
* @throws IOException if an I/O error occurs to the socket channel.
*/
private void closeConnection() throws IOException {
engine.closeOutbound();
try {
doHandshake();
} catch ( IOException e ) {
//Just ignore this exception since we are closing the connection already
}
socketChannel.close();
}
代码示例来源:origin: io.netty/netty
@Override
public void closeOutbound() {
NextProtoNego.remove(engine);
engine.closeOutbound();
}
代码示例来源:origin: apache/kafka
if (state == State.CLOSING) return;
state = State.CLOSING;
sslEngine.closeOutbound();
try {
if (prevState != State.NOT_INITALIZED && isConnected()) {
代码示例来源:origin: redisson/redisson
private void closeOutbound0(ChannelPromise promise) {
outboundClosed = true;
engine.closeOutbound();
try {
flush(ctx, promise);
} catch (Exception e) {
if (!promise.tryFailure(e)) {
logger.warn("{} flush() raised a masked exception.", ctx.channel(), e);
}
}
}
代码示例来源:origin: apache/kafka
/**
* SSL exceptions are propagated as authentication failures so that clients can avoid
* retries and report the failure. If `flush` is true, exceptions are propagated after
* any pending outgoing bytes are flushed to ensure that the peer is notified of the failure.
*/
private void handshakeFailure(SSLException sslException, boolean flush) throws IOException {
//Release all resources such as internal buffers that SSLEngine is managing
sslEngine.closeOutbound();
try {
sslEngine.closeInbound();
} catch (SSLException e) {
log.debug("SSLEngine.closeInBound() raised an exception.", e);
}
state = State.HANDSHAKE_FAILED;
handshakeException = new SslAuthenticationException("SSL handshake failed", sslException);
// Attempt to flush any outgoing bytes. If flush doesn't complete, delay exception handling until outgoing bytes
// are flushed. If write fails because remote end has closed the channel, log the I/O exception and continue to
// handle the handshake failure as an authentication exception.
try {
if (!flush || flush(netWriteBuffer))
throw handshakeException;
} catch (IOException e) {
log.debug("Failed to flush all bytes before closing channel", e);
throw handshakeException;
}
}
代码示例来源:origin: wildfly/wildfly
private void closeOutbound0(ChannelPromise promise) {
outboundClosed = true;
engine.closeOutbound();
try {
flush(ctx, promise);
} catch (Exception e) {
if (!promise.tryFailure(e)) {
logger.warn("{} flush() raised a masked exception.", ctx.channel(), e);
}
}
}
代码示例来源:origin: io.netty/netty
private void closeEngine() {
engine.closeOutbound();
if (sentCloseNotify == 0 && handshaken) {
try {
engine.closeInbound();
} catch (SSLException ex) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to clean up SSLEngine.", ex);
}
}
}
}
代码示例来源:origin: redisson/redisson
engine.closeOutbound();
内容来源于网络,如有侵权,请联系作者删除!