private ChunkingChannelBuffer newChunkingBuffer( Channel channel ) { return newChunkingBuffer( ChannelBuffers.dynamicBuffer(), channel, chunkSize, getInternalProtocolVersion(), applicationProtocolVersion ); }
private Byte readContinuationHeader( ChannelBuffer buffer, final Channel channel ) { byte[] header = new byte[2]; buffer.readBytes( header ); try { // Read request header and assert correct internal/application protocol version assertSameProtocolVersion( header, getInternalProtocolVersion(), applicationProtocolVersion ); } catch ( final IllegalProtocolVersionException e ) { // Version mismatch, fail with a good exception back to the client submitSilent( targetCallExecutor, () -> writeFailureResponse( e, newChunkingBuffer( channel ) ) ); return null; } return (byte) (header[0] & 0x1); }
getInternalProtocolVersion(), applicationProtocolVersion ); submitSilent( targetCallExecutor, new TargetCaller( type, channel, context, chunkingBuffer, bufferToReadFrom ) );