org.jppf.server.nio.nodeserver
Class RemoteNodeMessage

java.lang.Object
  extended by org.jppf.server.nio.nodeserver.AbstractNodeMessage
      extended by org.jppf.server.nio.nodeserver.RemoteNodeMessage

public class RemoteNodeMessage
extends AbstractNodeMessage

Representation of a message sent or received by a remote node.

Author:
Laurent Cohen

Field Summary
protected  int currentLength
          The length of the location at the current position.
protected  NioObject currentLengthObject
          Object storing the length of the object currently being read or written.
protected  NioObject currentObject
          Object storing the object currently being read or written.
 
Fields inherited from class org.jppf.server.nio.nodeserver.AbstractNodeMessage
bundle, count, length, locations, nbObjects, position
 
Constructor Summary
RemoteNodeMessage()
           
 
Method Summary
protected  boolean readNextObject(ChannelWrapper<?> wrapper)
          Read the next serializable object from the specified channel.
 String toString()
          
protected  boolean writeNextObject(ChannelWrapper<?> wrapper)
          Write the next object to the specified channel.
 
Methods inherited from class org.jppf.server.nio.nodeserver.AbstractNodeMessage
addLocation, getBundle, getLength, getLocations, read, setBundle, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

currentLength

protected int currentLength
The length of the location at the current position.


currentLengthObject

protected NioObject currentLengthObject
Object storing the length of the object currently being read or written.


currentObject

protected NioObject currentObject
Object storing the object currently being read or written.

Constructor Detail

RemoteNodeMessage

public RemoteNodeMessage()
Method Detail

readNextObject

protected boolean readNextObject(ChannelWrapper<?> wrapper)
                          throws Exception
Read the next serializable object from the specified channel.

Specified by:
readNextObject in class AbstractNodeMessage
Parameters:
wrapper - the channel to read from.
Returns:
true if the object has been completely read from the channel, false otherwise.
Throws:
Exception - if an IO error occurs.

writeNextObject

protected boolean writeNextObject(ChannelWrapper<?> wrapper)
                           throws Exception
Write the next object to the specified channel.

Specified by:
writeNextObject in class AbstractNodeMessage
Parameters:
wrapper - the channel to write to.
Returns:
true if the object has been completely written the channel, false otherwise.
Throws:
Exception - if an IO error occurs.

toString

public String toString()

Overrides:
toString in class AbstractNodeMessage


Copyright © 2005-2010 JPPF Team.