Package org.jppf.nio
Class AbstractNioObject
java.lang.Object
org.jppf.nio.AbstractNioObject
- All Implemented Interfaces:
NioObject
- Direct Known Subclasses:
PlainNioObject,SSLNioObject
Abstract implementation of the
NioObject interface, providing the means to keep stateful information
across multiple calls to the read() or write() methods.- Author:
- Laurent Cohen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longActual bytes sent to or received from the underlying channel (in encrypted form for secure channels).protected intWhat has currently been read from or written to the message.protected final DataLocationLocation of the data to read or write.protected final intThe size of the data ot send or receive. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractNioObject(DataLocation location, int size) Initialize this NioObject with the specified data location and size. -
Method Summary
-
Field Details
-
size
protected final int sizeThe size of the data ot send or receive. -
count
protected int countWhat has currently been read from or written to the message. -
location
Location of the data to read or write. -
channelCount
protected long channelCountActual bytes sent to or received from the underlying channel (in encrypted form for secure channels).
-
-
Constructor Details
-
AbstractNioObject
Initialize this NioObject with the specified data location and size.- Parameters:
location- the object which holds the data to read or write.size- the size of the data.
-
-
Method Details
-
getData
Description copied from interface:NioObjectLocation of the data to read or write. -
getSize
public int getSize()Description copied from interface:NioObjectGet the size of the data ot send or receive. -
getChannelCount
public long getChannelCount()Description copied from interface:NioObjectGet the actual bytes sent to or received from the underlying channel.- Specified by:
getChannelCountin interfaceNioObject- Returns:
- the number of bytes as a long value.
-
reset
Description copied from interface:NioObjectReset this object.
-