@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; AbstractWebSocketConnection other = (AbstractWebSocketConnection)obj; EndPoint endp = getEndPoint(); EndPoint otherEndp = other.getEndPoint(); if (endp == null) { if (otherEndp != null) return false; } else if (!endp.equals(otherEndp)) return false; return true; }
@Override public InetSocketAddress getRemoteAddress() { return getEndPoint().getRemoteAddress(); }
@Override public InetSocketAddress getRemoteAddress() { return getEndPoint().getRemoteAddress(); }
@Override public InetSocketAddress getRemoteAddress() { return getEndPoint().getRemoteAddress(); }
@Override public long getIdleTimeout() { return getEndPoint().getIdleTimeout(); }
@Override public boolean isOpen() { return getEndPoint().isOpen(); }
@Override public void setMaxIdleTimeout(long ms) { getEndPoint().setIdleTimeout(ms); }
@Override public long getMaxIdleTimeout() { return getEndPoint().getIdleTimeout(); }
@Override public boolean isOpen() { return getIOState().isOpen() && getEndPoint().isOpen(); }
@Override public boolean isOpen() { return getIOState().isOpen() && getEndPoint().isOpen(); }
private <C> void write(ByteBuffer buffer) { EndPoint endpoint = getEndPoint(); if (!isOpen()) { writeBytes.failAll(new IOException("Connection closed")); return; } try { endpoint.write(writeBytes,buffer); } catch (Throwable t) { writeBytes.failed(t); } } }
private <C> void write(ByteBuffer buffer) { EndPoint endpoint = getEndPoint(); if (!isOpen()) { writeBytes.failAll(new IOException("Connection closed")); return; } try { endpoint.write(writeBytes,buffer); } catch (Throwable t) { writeBytes.failed(t); } } }
@Override public int hashCode() { final int prime = 31; int result = 1; EndPoint endp = getEndPoint(); if(endp != null) { result = prime * result + endp.getLocalAddress().hashCode(); result = prime * result + endp.getRemoteAddress().hashCode(); } return result; }
@Override public void disconnect() { if (LOG.isDebugEnabled()) LOG.debug("{} disconnect()",policy.getBehavior()); flusher.terminate(new EOFException("Disconnected"), false); EndPoint endPoint = getEndPoint(); // We need to gently close first, to allow // SSL close alerts to be sent by Jetty endPoint.shutdownOutput(); endPoint.close(); }
public void disconnect(boolean onlyOutput) { ioState.setState(ConnectionState.CLOSED); EndPoint endPoint = getEndPoint(); // We need to gently close first, to allow // SSL close alerts to be sent by Jetty LOG.debug("Shutting down output {}",endPoint); endPoint.shutdownOutput(); if (!onlyOutput) { LOG.debug("Closing {}",endPoint); endPoint.close(); } }
public void disconnect(boolean onlyOutput) { ioState.setState(ConnectionState.CLOSED); EndPoint endPoint = getEndPoint(); // We need to gently close first, to allow // SSL close alerts to be sent by Jetty LOG.debug("Shutting down output {}",endPoint); endPoint.shutdownOutput(); if (!onlyOutput) { LOG.debug("Closing {}",endPoint); endPoint.close(); } }
private ReadMode readParse(ByteBuffer buffer) EndPoint endPoint = getEndPoint(); try
private int read(ByteBuffer buffer) EndPoint endPoint = getEndPoint(); try
private int read(ByteBuffer buffer) EndPoint endPoint = getEndPoint(); try
private ReadMode readDiscard(ByteBuffer buffer) EndPoint endPoint = getEndPoint(); try