@Override public String getID() { return streamHandler.getID(); } };
@Override public void onData(String streamId, ByteBuffer buf) throws IOException { streamHandler.onData(streamId, buf); }
@Override public void onComplete(String streamId) throws IOException { try { streamHandler.onComplete(streamId); callback.onSuccess(ByteBuffer.allocate(0)); } catch (Exception ex) { IOException ioExc = new IOException("Failure post-processing complete stream;" + " failing this rpc and leaving channel active", ex); callback.onFailure(ioExc); streamHandler.onFailure(streamId, ioExc); } }
if (req.bodyByteCount > 0) { StreamInterceptor<RequestMessage> interceptor = new StreamInterceptor<>( this, wrappedCallback.getID(), req.bodyByteCount, wrappedCallback); frameDecoder.setInterceptor(interceptor); } else { wrappedCallback.onComplete(wrappedCallback.getID());
@Override public void onFailure(String streamId, Throwable cause) throws IOException { callback.onFailure(new IOException("Destination failed while reading stream", cause)); streamHandler.onFailure(streamId, cause); }
@Override public void onComplete(String streamId) throws IOException { try { streamHandler.onComplete(streamId); callback.onSuccess(ByteBuffer.allocate(0)); } catch (Exception ex) { IOException ioExc = new IOException("Failure post-processing complete stream;" + " failing this rpc and leaving channel active", ex); callback.onFailure(ioExc); streamHandler.onFailure(streamId, ioExc); } }
if (req.bodyByteCount > 0) { StreamInterceptor<RequestMessage> interceptor = new StreamInterceptor<>( this, wrappedCallback.getID(), req.bodyByteCount, wrappedCallback); frameDecoder.setInterceptor(interceptor); } else { wrappedCallback.onComplete(wrappedCallback.getID());
@Override public void onFailure(String streamId, Throwable cause) throws IOException { callback.onFailure(new IOException("Destination failed while reading stream", cause)); streamHandler.onFailure(streamId, cause); }
@Override public String getID() { return streamHandler.getID(); } };
@Override public void onData(String streamId, ByteBuffer buf) throws IOException { streamHandler.onData(streamId, buf); }