Package com.celeral.netconf
Interface ByteBufferProcessor
-
public interface ByteBufferProcessor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
completed()
void
failed(java.lang.Throwable exc)
The caller of this processor encountered failure.boolean
process(java.nio.ByteBuffer buffer)
Process the argument either from reading the data from it or writing the data to it.
-
-
-
Method Detail
-
process
boolean process(java.nio.ByteBuffer buffer)
Process the argument either from reading the data from it or writing the data to it. The processing semantics is decided by the context in which the call is made. e.g. if the call is made in response to read, the buffer will contain the data to be read. If the call is made in response to write, the buffer needs to be filled with the data that needs to be written.- Parameters:
buffer
- the medium to exchange the bytes- Returns:
- true to register interest to be called one more time, false otherwise.
-
failed
void failed(java.lang.Throwable exc)
The caller of this processor encountered failure. The failure is typically IO related.- Parameters:
exc
- exception populated with the context of the failure.
-
completed
void completed()
-
-