@Override public void close() throws IOException { if (channel.isOpen()) { LOG.info("closing to "+getRemoteName()); channel.close(); } sasl.dispose(); }
/** Create using the specified {@link SaslClient}. */ public SaslSocketTransceiver(SocketAddress address, SaslClient saslClient) throws IOException { this.sasl = new SaslParticipant(saslClient); this.channel = SocketChannel.open(address); this.channel.socket().setTcpNoDelay(true); LOG.debug("open to {}", getRemoteName()); open(true); }
/** Create using the specified {@link SaslServer}. */ public SaslSocketTransceiver(SocketChannel channel, SaslServer saslServer) throws IOException { this.sasl = new SaslParticipant(saslServer); this.channel = channel; LOG.debug("open from {}", getRemoteName()); open(false); }
@Override public void close() throws IOException { if (channel.isOpen()) { LOG.info("closing to "+getRemoteName()); channel.close(); } sasl.dispose(); }
/** Create using the specified {@link SaslClient}. */ public SaslSocketTransceiver(SocketAddress address, SaslClient saslClient) throws IOException { this.sasl = new SaslParticipant(saslClient); this.channel = SocketChannel.open(address); this.channel.socket().setTcpNoDelay(true); LOG.debug("open to {}", getRemoteName()); open(true); }
/** Create using the specified {@link SaslServer}. */ public SaslSocketTransceiver(SocketChannel channel, SaslServer saslServer) throws IOException { this.sasl = new SaslParticipant(saslServer); this.channel = channel; LOG.debug("open from {}", getRemoteName()); open(false); }