Interface ChannelFunction
-
- All Known Implementing Classes:
Masker
,UTF8Checker
public interface ChannelFunction
- Author:
- Norman Maurer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
afterRead(java.nio.ByteBuffer buf, int position, int length)
Is called on theByteBuffer
after a read operation completesvoid
beforeWrite(java.nio.ByteBuffer buf, int position, int length)
Is called on theByteBuffer
before a write operation completesvoid
complete()
Is called to complete theChannelFunction
.void
newFrame(FrameHeaderData headerData)
-
-
-
Method Detail
-
newFrame
void newFrame(FrameHeaderData headerData)
-
afterRead
void afterRead(java.nio.ByteBuffer buf, int position, int length) throws java.io.IOException
Is called on theByteBuffer
after a read operation completes- Parameters:
buf
- theByteBuffer
to operate onposition
- the index in theByteBuffer
to start fromlength
- the number of bytes to operate on- Throws:
java.io.IOException
- thrown if an error occurs
-
beforeWrite
void beforeWrite(java.nio.ByteBuffer buf, int position, int length) throws java.io.IOException
Is called on theByteBuffer
before a write operation completes- Parameters:
buf
- theByteBuffer
to operate onposition
- the index in theByteBuffer
to start fromlength
- the number of bytes to operate on- Throws:
java.io.IOException
- thrown if an error occurs
-
complete
void complete() throws java.io.IOException
Is called to complete theChannelFunction
. Access it after complete is called may result in unexpected behavior.- Throws:
java.io.IOException
- thrown if an error occurs
-
-