Package org.glassfish.grizzly.asyncqueue
Interface WritableMessage
-
- All Known Implementing Classes:
BuffersBuffer,ByteBufferManager.SmallByteBufferWrapper,ByteBufferWrapper,CompositeBuffer,FileTransfer,HeapBuffer
public interface WritableMessageCommon interface for entities that may be written to aChannel.- Since:
- 2.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasRemaining()Returntrueif this message has data remaining to be written.booleanisExternal()Returns true if the message represents an external resource (for exampleFileTransfer), which is not loaded in memory.booleanrelease()Perform message specific actions to release resources held by the entity backing thisWritableMessage.intremaining()Return the number of bytes remaining to be written.
-
-
-
Method Detail
-
hasRemaining
boolean hasRemaining()
Returntrueif this message has data remaining to be written.- Returns:
trueif this message has data remaining to be written.
-
remaining
int remaining()
Return the number of bytes remaining to be written.- Returns:
- the number of bytes remaining to be written.
-
release
boolean release()
Perform message specific actions to release resources held by the entity backing thisWritableMessage.- Returns:
- true if successfully released
-
isExternal
boolean isExternal()
Returns true if the message represents an external resource (for exampleFileTransfer), which is not loaded in memory.- Returns:
- False, if the message is located in memory (like
Buffer).
-
-