Package org.jppf.nio
Class SimpleNioMessage
java.lang.Object
org.jppf.nio.AbstractNioMessageBase
org.jppf.nio.SimpleNioMessage
- All Implemented Interfaces:
NioMessage
An
NioMessage that reads or writes a single object.- Author:
- Laurent Cohen
-
Field Summary
Fields inherited from class org.jppf.nio.AbstractNioMessageBase
channel, channelReadCount, channelWriteCount, count, currentDataLocation, currentLength, currentLengthObject, currentObject, lengthBuf, resetCurrentLength, ssl, sslHandler, sslHandlerReadCount, sslHandlerWriteCountFields inherited from interface org.jppf.nio.NioMessage
READ, WRITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanread()Read data from a channel.voidsetCurrentDataLocation(DataLocation location) Add a location to the data locations of this message.toString()booleanwrite()Read data from a channel.Methods inherited from class org.jppf.nio.AbstractNioMessageBase
getChannelReadCount, getChannelWriteCount, getCurrentDataLocation, isSSL, updateCounts
-
Constructor Details
-
SimpleNioMessage
Initialize this nio message.- Parameters:
channel- the channel to read from or write to.
-
-
Method Details
-
setCurrentDataLocation
Add a location to the data locations of this message.- Parameters:
location- the location to add.
-
read
Description copied from interface:NioMessageRead 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
Description copied from interface:NioMessageRead data from a channel.- Returns:
- true if the data has been completely written the channel, false otherwise.
- Throws:
Exception- if an IO error occurs.
-
toString
-