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 voidafterRead(ByteBuffer buf, int position, int length)Is called on theByteBufferafter a read operation completesvoidbeforeWrite(ByteBuffer buf, int position, int length)Is called on theByteBufferbefore a write operation completesvoidcomplete()Is called to complete theChannelFunction.voidnewFrame(FrameHeaderData headerData)
-
-
-
Method Detail
-
newFrame
void newFrame(FrameHeaderData headerData)
-
afterRead
void afterRead(ByteBuffer buf, int position, int length) throws IOException
Is called on theByteBufferafter a read operation completes- Parameters:
buf- theByteBufferto operate onposition- the index in theByteBufferto start fromlength- the number of bytes to operate on- Throws:
IOException- thrown if an error occurs
-
beforeWrite
void beforeWrite(ByteBuffer buf, int position, int length) throws IOException
Is called on theByteBufferbefore a write operation completes- Parameters:
buf- theByteBufferto operate onposition- the index in theByteBufferto start fromlength- the number of bytes to operate on- Throws:
IOException- thrown if an error occurs
-
complete
void complete() throws IOExceptionIs called to complete theChannelFunction. Access it after complete is called may result in unexpected behavior.- Throws:
IOException- thrown if an error occurs
-
-