Package jade.imtp.leap.nio
Interface BufferTransformer
-
- All Known Implementing Classes:
NIOHTTPHelper,SSLEngineHelper
public interface BufferTransformerA buffertransformer is responsible for the preparation of data read from a socket or data to be written to a socket. Implementers are responsible for preparing (ByteBuffer.flip()) the data returned.- Author:
- Eduard Drenth: Logica, 24-sep-2009
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteBufferpostprocessBufferRead(ByteBuffer socketData)implementers can transform data available read from the socket.ByteBufferpreprocessBufferToWrite(ByteBuffer dataToSend)implementers can transform the bytes before they are sent.
-
-
-
Method Detail
-
postprocessBufferRead
ByteBuffer postprocessBufferRead(ByteBuffer socketData) throws IOException
implementers can transform data available read from the socket. Any data left in the socketData argument will be used in subsequentNIOJICPConnection.readPacket()calls.- Parameters:
socketData-- Returns:
- a buffer containing the transformed data
- Throws:
IOException- will be handled by theBEManagementServiceand if applicableNIOMediator
-
preprocessBufferToWrite
ByteBuffer preprocessBufferToWrite(ByteBuffer dataToSend) throws IOException
implementers can transform the bytes before they are sent. When data in the dataToSend argument are left a IOException will be thrown byNIOJICPConnection.writePacket(jade.imtp.leap.JICP.JICPPacket).- Parameters:
dataToSend-- Returns:
- the ByteBuffer to send
- Throws:
IOException- will be handled by theBEManagementServiceand if applicableNIOMediator
-
-