protected static final class MessageChannelHandler.Marker
extends java.lang.Object
Constructor and Description |
---|
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,
java.lang.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 int messageSizeWithRemainingHeaders()
public int messageSizeWithAllHeaders()
public int messageSize()
public int expectedReaderIndex()
public void validateRequest(StreamInput stream, long requestId, java.lang.String action) throws java.io.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.java.io.IOException
- Iff the stream could not be read.java.lang.IllegalStateException
- Iff the request has not been fully read.public void validateResponse(StreamInput stream, long requestId, TransportResponseHandler<?> handler, boolean error) throws java.io.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.java.io.IOException
- Iff the stream could not be read.java.lang.IllegalStateException
- Iff the request has not been fully read.