protected static final class MessageChannelHandler.Marker extends Object
Constructor and Description |
---|
MessageChannelHandler.Marker(org.jboss.netty.buffer.ChannelBuffer buffer) |
Modifier and Type | Method and Description |
---|---|
int |
expectedReaderIndex() |
int |
messageSize() |
int |
messageSizeWithAllHeaders() |
int |
messageSizeWithRemainingHeaders() |
void |
validateRequest(StreamInput stream,
long requestId,
String action)
Validates that a request has been fully read (not too few bytes but also not too many bytes).
|
void |
validateResponse(StreamInput stream,
long requestId,
TransportResponseHandler<?> handler,
boolean error)
Validates that a response has been fully read (not too few bytes but also not too many bytes).
|
public MessageChannelHandler.Marker(org.jboss.netty.buffer.ChannelBuffer buffer)
public int messageSizeWithRemainingHeaders()
public int messageSizeWithAllHeaders()
public int messageSize()
public int expectedReaderIndex()
public void validateRequest(StreamInput stream, long requestId, String action) throws IOException
stream
- A stream that is associated with the buffer that is tracked by this marker.requestId
- The current request id.action
- The currently executed action.IOException
- Iff the stream could not be read.IllegalStateException
- Iff the request has not been fully read.public void validateResponse(StreamInput stream, long requestId, TransportResponseHandler<?> handler, boolean error) throws IOException
stream
- A stream that is associated with the buffer that is tracked by this marker.requestId
- The corresponding request id for this response.handler
- The current response handler.error
- Whether validate an error response.IOException
- Iff the stream could not be read.IllegalStateException
- Iff the request has not been fully read.Copyright © 2009–2017. All rights reserved.