Interface BufferProcessor
-
- All Known Implementing Classes:
BufferedSelectionChannel,ChannelInputStream,ClientInboundWay,ClientOutboundWay,HttpClientInboundWay,HttpClientOutboundWay,HttpsClientInboundWay,HttpsClientOutboundWay,HttpServerInboundWay,HttpServerOutboundWay,HttpsServerInboundWay,HttpsServerOutboundWay,InboundWay,OutboundWay,ReadableBufferedChannel,ReadableChunkedChannel,ReadableSizedSelectionChannel,ReadableSslChannel,ServerInboundWay,ServerOutboundWay,Way,WritableBufferedChannel,WritableSslChannel
@Deprecated public interface BufferProcessorDeprecated.Will be removed to favor lower-level network extensions allowing more control at the Restlet API level.Interface called back when IO buffer draining or filling can actually be done.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleancanLoop(Buffer buffer, java.lang.Object... args)Deprecated.Indicates if the processing loop can continue.booleancouldFill(Buffer buffer, java.lang.Object... args)Deprecated.Indicates if the buffer could be filled again.intonDrain(Buffer buffer, int maxDrained, java.lang.Object... args)Deprecated.Drains the byte buffer.intonFill(Buffer buffer, java.lang.Object... args)Deprecated.Fills the byte buffer.voidonFillEof()Deprecated.Called back when a fill operation returns with an EOF status.voidpostProcess(int drained)Deprecated.Called back after a complete processing pass.intpreProcess(int maxDrained, java.lang.Object... args)Deprecated.Called back before a processing pass.
-
-
-
Method Detail
-
canLoop
boolean canLoop(Buffer buffer, java.lang.Object... args)
Deprecated.Indicates if the processing loop can continue.- Parameters:
buffer- The IO buffer to drain.args- The optional arguments to pass back to the callbacks.- Returns:
- True if the processing loop can continue.
-
couldFill
boolean couldFill(Buffer buffer, java.lang.Object... args)
Deprecated.Indicates if the buffer could be filled again.- Parameters:
buffer- The IO buffer to fill.args- The optional arguments to pass back to the callbacks.- Returns:
- True if the buffer could be filled again.
-
onDrain
int onDrain(Buffer buffer, int maxDrained, java.lang.Object... args) throws java.io.IOException
Deprecated.Drains the byte buffer.- Parameters:
buffer- The IO buffer to drain.maxDrained- The maximum number of bytes drained by this call.args- The optional arguments to pass back to the callbacks.- Returns:
- The number of bytes drained.
- Throws:
java.io.IOException
-
onFill
int onFill(Buffer buffer, java.lang.Object... args) throws java.io.IOException
Deprecated.Fills the byte buffer.- Parameters:
buffer- The IO buffer to drain.args- The optional arguments to pass back to the callbacks.- Returns:
- The number of bytes filled.
- Throws:
java.io.IOException
-
onFillEof
void onFillEof()
Deprecated.Called back when a fill operation returns with an EOF status.
-
postProcess
void postProcess(int drained) throws java.io.IOExceptionDeprecated.Called back after a complete processing pass.- Parameters:
drained- The number of bytes drained or -1 if the filling source has ended.- Throws:
java.io.IOException
-
preProcess
int preProcess(int maxDrained, java.lang.Object... args) throws java.io.IOExceptionDeprecated.Called back before a processing pass.- Parameters:
maxDrained- The maximum number of bytes drained by this call or 0 for unlimited length.args- The optional arguments to pass back to the callbacks.- Returns:
- The number of bytes drained or -1 if the filling source has ended.
- Throws:
java.io.IOException
-
-