@Override public void onOpen() { super.onOpen(); try { getEndPoint().flush(BufferUtil.EMPTY_BUFFER); if (completed) replaceConnection(); else fillInterested(); } catch (IOException x) { close(); throw new RuntimeIOException(x); } }
@Override public void onFillable() { while (true) { int filled = fill(); if (filled == 0 && !completed) fillInterested(); if (filled <= 0 || completed) break; } if (completed) replaceConnection(); }
private int fill() { try { return getEndPoint().fill(BufferUtil.EMPTY_BUFFER); } catch (IOException x) { LOG.debug(x); close(); return -1; } }
@Override public void close() { // Gentler close for SSL. getEndPoint().shutdownOutput(); super.close(); } }
@Override public void close() { NextProtoNego.remove(getSSLEngine()); super.close(); } }
private int fill() { try { return getEndPoint().fill(BufferUtil.EMPTY_BUFFER); } catch (IOException x) { LOG.debug(x); close(); return -1; } }
@Override public void close() { // Gentler close for SSL. getEndPoint().shutdownOutput(); super.close(); } }
@Override public void onOpen() { super.onOpen(); try { getEndPoint().flush(BufferUtil.EMPTY_BUFFER); if (completed) replaceConnection(); else fillInterested(); } catch (IOException x) { close(); throw new RuntimeIOException(x); } }
private int fill() { try { return getEndPoint().fill(BufferUtil.EMPTY_BUFFER); } catch (IOException x) { LOG.debug(x); close(); return -1; } }
@Override public void onFillable() { while (true) { int filled = fill(); if (filled == 0 && !completed) fillInterested(); if (filled <= 0 || completed) break; } if (completed) replaceConnection(); }
@Override public void close() { // Gentler close for SSL. getEndPoint().shutdownOutput(); super.close(); } }
@Override public void onOpen() { super.onOpen(); try { getEndPoint().flush(BufferUtil.EMPTY_BUFFER); if (completed) replaceConnection(); else fillInterested(); } catch (IOException x) { close(); throw new RuntimeIOException(x); } }
private int fill() { try { return getEndPoint().fill(BufferUtil.EMPTY_BUFFER); } catch (IOException x) { LOG.debug(x); close(); return -1; } }
@Override public void onFillable() { while (true) { int filled = fill(); if (completed || filled < 0) { replaceConnection(); break; } if (filled == 0) { fillInterested(); break; } } }
@Override public void close() { // Gentler close for SSL. getEndPoint().shutdownOutput(); super.close(); } }
@Override public void onOpen() { super.onOpen(); try { getEndPoint().flush(BufferUtil.EMPTY_BUFFER); if (completed) replaceConnection(); else fillInterested(); } catch (IOException x) { close(); throw new RuntimeIOException(x); } }
private void replaceConnection() { EndPoint endPoint = getEndPoint(); try { endPoint.upgrade(connectionFactory.newConnection(endPoint, context)); } catch (Throwable x) { LOG.debug(x); close(); } }
@Override public void onFillable() { while (true) { int filled = fill(); if (completed || filled < 0) { replaceConnection(); break; } if (filled == 0) { fillInterested(); break; } } }
private void replaceConnection() { EndPoint endPoint = getEndPoint(); try { endPoint.upgrade(connectionFactory.newConnection(endPoint, context)); } catch (Throwable x) { LOG.debug(x); close(); } }
private void replaceConnection() { EndPoint endPoint = getEndPoint(); try { endPoint.upgrade(connectionFactory.newConnection(endPoint, context)); } catch (Throwable x) { LOG.debug(x); close(); } }