本文整理了Java中javax.net.ssl.SSLEngine.closeInbound()
方法的一些代码示例,展示了SSLEngine.closeInbound()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SSLEngine.closeInbound()
方法的具体详情如下:
包路径:javax.net.ssl.SSLEngine
类名称:SSLEngine
方法名:closeInbound
[英]Notifies this engine instance that no more inbound network data will be sent to this engine.
[中]通知此引擎实例不再向此引擎发送入站网络数据。
代码示例来源:origin: redisson/redisson
@Override
public void closeInbound() throws SSLException {
engine.closeInbound();
}
代码示例来源:origin: wildfly/wildfly
@Override
public void closeInbound() throws SSLException {
engine.closeInbound();
}
代码示例来源:origin: wildfly/wildfly
@Override
public void closeInbound() throws SSLException {
delegate.closeInbound();
}
代码示例来源:origin: wildfly/wildfly
@Override
public void closeInbound() throws SSLException {
delegate.closeInbound();
}
代码示例来源:origin: wildfly/wildfly
public void closeInbound() throws SSLException {
delegate.closeInbound();
}
代码示例来源:origin: wildfly/wildfly
public void closeInbound() throws SSLException {
currentRef.get().closeInbound();
}
代码示例来源:origin: wildfly/wildfly
public void closeInbound() throws SSLException {
currentRef.get().closeInbound();
}
代码示例来源:origin: wildfly/wildfly
public void closeInbound() throws SSLException {
currentRef.get().closeInbound();
}
代码示例来源:origin: apache/kafka
void close() {
sslEngine.closeOutbound();
try {
sslEngine.closeInbound();
} catch (Exception e) {
// ignore
}
}
}
代码示例来源:origin: TooTallNate/Java-WebSocket
/**
* In addition to orderly shutdowns, an unorderly shutdown may occur, when the transport link (socket channel)
* is severed before close messages are exchanged. This may happen by getting an -1 or {@link IOException}
* when trying to read from the socket channel, or an {@link IOException} when trying to write to it.
* In both cases {@link SSLEngine#closeInbound()} should be called and then try to follow the standard procedure.
*
* @throws IOException if an I/O error occurs to the socket channel.
*/
private void handleEndOfStream() throws IOException {
try {
engine.closeInbound();
} catch ( Exception e ) {
log.error( "This engine was forced to close inbound, without having received the proper SSL/TLS close notification message from the peer, due to end of stream." );
}
closeConnection();
}
代码示例来源:origin: io.netty/netty
@Override
public void closeInbound() throws SSLException {
NextProtoNego.remove(engine);
engine.closeInbound();
}
代码示例来源: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: rapidoid/rapidoid
public synchronized void closeInbound() {
try {
engine.closeInbound();
} catch (SSLException e) {
Log.warn("SSL error while closing connection", "message", Msc.errorMsg(e));
}
}
代码示例来源:origin: apache/ignite
/**
* Shuts down the handler.
*/
void shutdown() {
try {
sslEngine.closeInbound();
}
catch (SSLException e) {
// According to javadoc, the only case when exception is thrown is when no close_notify
// message was received before TCP connection get closed.
if (log.isDebugEnabled())
log.debug("Unable to correctly close inbound data stream (will ignore) [msg=" + e.getMessage() +
", ses=" + ses + ']');
}
}
代码示例来源: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.closeInbound();
} catch (SSLException e) {
if (logger.isDebugEnabled()) {
代码示例来源:origin: wildfly/wildfly
engine.closeInbound();
} catch (SSLException e) {
if (logger.isDebugEnabled()) {
代码示例来源:origin: wildfly/wildfly
engine.closeInbound();
代码示例来源:origin: wildfly/wildfly
void notifyReadClosed() {
if(anyAreSet(state, FLAG_READ_CLOSED)) {
return;
}
boolean runListener = isReadResumed() && anyAreSet(state, FLAG_CLOSED);
connection.readClosed();
try {
engine.closeInbound();
} catch (SSLException e) {
UndertowLogger.REQUEST_IO_LOGGER.trace("Exception closing read side of SSL channel", e);
if(allAreClear(state, FLAG_WRITE_CLOSED) && isWriteResumed()) {
runWriteListener();
}
}
state |= FLAG_READ_CLOSED | FLAG_ENGINE_INBOUND_SHUTDOWN | FLAG_READ_SHUTDOWN;
if(anyAreSet(state, FLAG_WRITE_CLOSED)) {
closed();
}
if(anyAreSet(state, FLAG_WRITE_REQUIRES_READ)) {
notifyWriteClosed();
}
if(runListener) {
runReadListener(false);
}
}
代码示例来源:origin: wildfly/wildfly
engine.closeInbound();
} catch (SSLException e) {
UndertowLogger.REQUEST_LOGGER.ioException(e);
内容来源于网络,如有侵权,请联系作者删除!