@Override public void completed(Integer result, Void attachment) { if (result.intValue() == -1) { // BZ 57762. A dropped connection will get reported as EOF // rather than as an error so handle it here. if (isOpen()) { // No close frame was received close(new EOFException()); } // No data to process return; } response.flip(); doResumeProcessing(true); }
@Override public void completed(Integer result, Void attachment) { if (result.intValue() == -1) { // BZ 57762. A dropped connection will get reported as EOF // rather than as an error so handle it here. if (isOpen()) { // No close frame was received close(new EOFException()); } // No data to process return; } response.flip(); doResumeProcessing(true); }
@Override public void failed(Throwable exc, Void attachment) { if (exc instanceof ReadBufferOverflowException) { // response will be empty if this exception is thrown response = ByteBuffer .allocate(((ReadBufferOverflowException) exc).getMinBufferSize()); response.flip(); doResumeProcessing(false); } else { close(exc); } }
public WsFrameClient(ByteBuffer response, AsyncChannelWrapper channel, WsSession wsSession, Transformation transformation) { super(wsSession, transformation); this.response = response; this.channel = channel; this.handler = new WsFrameClientCompletionHandler(); }
public WsFrameClient(ByteBuffer response, AsyncChannelWrapper channel, WsSession wsSession, Transformation transformation) { super(wsSession, transformation); this.response = response; this.channel = channel; this.handler = new WsFrameClientCompletionHandler(); }
public WsFrameClient(ByteBuffer response, AsyncChannelWrapper channel, WsSession wsSession) { super(wsSession); this.response = response; this.channel = channel; this.handler = new WsFrameClientCompletionHandler(); try { processSocketRead(); } catch (IOException e) { close(e); } }
public WsFrameClient(ByteBuffer response, AsyncChannelWrapper channel, WsSession wsSession, Transformation transformation) { super(wsSession, transformation); this.response = response; this.channel = channel; this.handler = new WsFrameClientCompletionHandler(); }
@Override public void failed(Throwable exc, Void attachment) { if (exc instanceof ReadBufferOverflowException) { // response will be empty if this exception is thrown response = ByteBuffer .allocate(((ReadBufferOverflowException) exc).getMinBufferSize()); response.flip(); doResumeProcessing(false); } else { close(exc); } }
public WsFrameClient(ByteBuffer response, AsyncChannelWrapper channel, WsSession wsSession, Transformation transformation) { super(wsSession, transformation); this.response = response; this.channel = channel; this.handler = new WsFrameClientCompletionHandler(); }