Package org.jppf.nio
Interface NioMessage
- All Known Implementing Classes:
AbstractNioMessage,AbstractNioMessageBase,ClassLoaderNioMessage,SimpleNioMessage
public interface NioMessage
Common interface for sending data over a communication channel.
A channel is a wrapper over a socket connection or in-memory pipe.
- Author:
- Laurent Cohen
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlongGet the actual bytes received from the underlying channel.longGet the actual bytes sent to the underlying channel.booleanisSSL()Determines whether this message read from / writes to an SSL connection.booleanread()Read data from a channel.booleanwrite()Read data from a channel.
-
Field Details
-
READ
static final int READRead operation.- See Also:
-
WRITE
static final int WRITEWrite operation.- See Also:
-
-
Method Details
-
read
Read data from a channel.- Returns:
- true if the data has been completely read from the channel, false otherwise.
- Throws:
Exception- if an IO error occurs.
-
write
Read data from a channel.- Returns:
- true if the data has been completely written the channel, false otherwise.
- Throws:
Exception- if an IO error occurs.
-
isSSL
boolean isSSL()Determines whether this message read from / writes to an SSL connection.- Returns:
trueis data is read from or written an SSL connection,falseotherwise.
-
getChannelReadCount
long getChannelReadCount()Get the actual bytes received from the underlying channel.- Returns:
- the number of bytes as a long value.
-
getChannelWriteCount
long getChannelWriteCount()Get the actual bytes sent to the underlying channel.- Returns:
- the number of bytes as a long value.
-