|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.server.nio.nodeserver.AbstractNodeMessage
public abstract class AbstractNodeMessage
Common abstract superclass representing a message sent or received by a node. A message is the transformation of a job into an more easily transportable format.
| Field Summary | |
|---|---|
protected JPPFTaskBundle |
bundle
The latest bundle that was sent or received. |
protected int |
count
The current count of bytes sent or received. |
protected int |
length
The total length of data to send or receive. |
protected LinkedList<DataLocation> |
locations
The data location objects abstracting the data to send or receive. |
protected int |
nbObjects
The number of objects toread or write. |
protected int |
position
The current position in the list of data locations. |
| Constructor Summary | |
|---|---|
AbstractNodeMessage()
|
|
| Method Summary | |
|---|---|
void |
addLocation(DataLocation location)
Add a location to the data locations of this message. |
JPPFTaskBundle |
getBundle()
Get the latest bundle that was sent or received. |
int |
getLength()
Get the total length of data to send or receive. |
List<DataLocation> |
getLocations()
Get the data location objects abstracting the data to send or receive. |
boolean |
read(ChannelWrapper<?> wrapper)
Read data from the channel. |
protected abstract boolean |
readNextObject(ChannelWrapper<?> wrapper)
Read the next serializable object from the specified channel. |
void |
setBundle(JPPFTaskBundle bundle)
Set the latest bundle that was sent or received. |
String |
toString()
|
boolean |
write(ChannelWrapper<?> wrapper)
Read data from the channel. |
protected abstract boolean |
writeNextObject(ChannelWrapper<?> wrapper)
Write the next object to the specified channel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int count
protected int length
protected LinkedList<DataLocation> locations
protected int position
protected int nbObjects
protected JPPFTaskBundle bundle
| Constructor Detail |
|---|
public AbstractNodeMessage()
| Method Detail |
|---|
public void addLocation(DataLocation location)
location - the location to add.
public boolean read(ChannelWrapper<?> wrapper)
throws Exception
wrapper - the channel to read from.
Exception - if an IO error occurs.
protected abstract boolean readNextObject(ChannelWrapper<?> wrapper)
throws Exception
wrapper - the channel to read from.
Exception - if an IO error occurs.
public boolean write(ChannelWrapper<?> wrapper)
throws Exception
wrapper - the channel to write to.
Exception - if an IO error occurs.
protected abstract boolean writeNextObject(ChannelWrapper<?> wrapper)
throws Exception
wrapper - the channel to write to.
Exception - if an IO error occurs.public List<DataLocation> getLocations()
DataLocation objects.public int getLength()
public JPPFTaskBundle getBundle()
JPPFTaskBundle instance.public void setBundle(JPPFTaskBundle bundle)
bundle - - a JPPFTaskBundle instance.public String toString()
toString in class Object
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||