public void handleEvent(final ConduitStreamSourceChannel channel) { final Pooled<ByteBuffer> pooled = connection.allocate(); boolean ok = false; try { ByteBuffer sendBuffer = pooled.getResource(); sendBuffer.put(Protocol.GREETING); ProtocolUtils.writeString(sendBuffer, Protocol.GRT_SERVER_NAME, serverName); sendBuffer.flip(); connection.setReadListener(new Initial(), true); connection.send(pooled); ok = true; return; } catch (BufferUnderflowException | BufferOverflowException e) { connection.handleException(log.invalidMessage(connection)); return; } finally { if (! ok) pooled.free(); } }
close = true; } else if (!isInitial) { connection.setReadListener(new Initial(), false);
server.trace("Server received capabilities request (cancelling authentication)"); saslDispose(saslServer); final Initial initial = new Initial(); connection.setReadListener(initial, true); initial.handleClientCapabilities(buffer);
connection.setReadListener(new Initial(), true); return; } finally {
connection.send(pooled); ok = true; connection.setReadListener(new Initial(), true); if (starttls) { connection.send(RemoteConnection.STARTTLS_SENTINEL);
server.trace("Server received capabilities request (cancelling authentication)"); saslDispose(saslServer); final Initial initial = new Initial(); connection.setReadListener(initial, true); initial.handleClientCapabilities(buffer);
connection.setReadListener(new Initial(), false);
close = true; } else if (!isInitial) { connection.setReadListener(new Initial(), false);
server.trace("Server received capabilities request (cancelling authentication)"); saslDispose(saslServer); final Initial initial = new Initial(); connection.setReadListener(initial, true); initial.handleClientCapabilities(buffer);
public void handleEvent(final ConnectedMessageChannel channel) { final Pooled<ByteBuffer> pooled = connection.allocate(); boolean ok = false; try { ByteBuffer sendBuffer = pooled.getResource(); sendBuffer.put(Protocol.GREETING); ProtocolUtils.writeString(sendBuffer, Protocol.GRT_SERVER_NAME, serverName); sendBuffer.flip(); connection.setReadListener(new Initial(), true); connection.send(pooled); ok = true; return; } catch (BufferUnderflowException e) { connection.handleException(RemoteLogger.log.invalidMessage(connection)); return; } catch (BufferOverflowException e) { connection.handleException(RemoteLogger.log.invalidMessage(connection)); return; } finally { if (! ok) pooled.free(); } }
public void handleEvent(final ConduitStreamSourceChannel channel) { final Pooled<ByteBuffer> pooled = connection.allocate(); boolean ok = false; try { ByteBuffer sendBuffer = pooled.getResource(); sendBuffer.put(Protocol.GREETING); ProtocolUtils.writeString(sendBuffer, Protocol.GRT_SERVER_NAME, serverName); sendBuffer.flip(); connection.setReadListener(new Initial(), true); connection.send(pooled); ok = true; return; } catch (BufferUnderflowException | BufferOverflowException e) { connection.handleException(log.invalidMessage(connection)); return; } finally { if (! ok) pooled.free(); } }
connection.send(pooled); ok = true; connection.setReadListener(new Initial(), true); if (starttls) { connection.send(RemoteConnection.STARTTLS_SENTINEL);