org.jppf.server.node.local
Class LocalNodeIO

java.lang.Object
  extended by org.jppf.server.node.AbstractNodeIO
      extended by org.jppf.server.node.local.LocalNodeIO
All Implemented Interfaces:
NodeIO

public class LocalNodeIO
extends AbstractNodeIO

This class performs the I/O operations requested by the JPPFNode, for reading the task bundles and sending the results back.

Author:
Laurent Cohen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jppf.server.node.AbstractNodeIO
AbstractNodeIO.BufferList, AbstractNodeIO.ObjectSerializationTask
 
Field Summary
 
Fields inherited from class org.jppf.server.node.AbstractNodeIO
currentBundle, node, serializer
 
Constructor Summary
LocalNodeIO(JPPFNode node)
          Initialize this TaskIO with the specified node.
 
Method Summary
protected  Object[] deserializeObjects()
          Perform the deserialization of the objects received through the socket connection.
protected  Object[] deserializeObjects(JPPFTaskBundle bundle)
          Perform the deserialization of the objects received through the socket connection.
protected  void handleReload()
          Performs the actions required if reloading the classes is necessary.
 void writeResults(JPPFTaskBundle bundle, List<JPPFTask> tasks)
          Write the execution results to the socket stream.
 
Methods inherited from class org.jppf.server.node.AbstractNodeIO
readObjects, readTask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalNodeIO

public LocalNodeIO(JPPFNode node)
Initialize this TaskIO with the specified node.

Parameters:
node - - the node who owns this TaskIO.
Method Detail

handleReload

protected void handleReload()
                     throws Exception
Performs the actions required if reloading the classes is necessary.

Specified by:
handleReload in class AbstractNodeIO
Throws:
Exception - if any error occurs.
See Also:
AbstractNodeIO.handleReload()

deserializeObjects

protected Object[] deserializeObjects()
                               throws Exception
Perform the deserialization of the objects received through the socket connection..

Specified by:
deserializeObjects in class AbstractNodeIO
Returns:
an array of objects deserialized from the socket stream.
Throws:
Exception - if an error occurs while deserializing.

deserializeObjects

protected Object[] deserializeObjects(JPPFTaskBundle bundle)
                               throws Exception
Perform the deserialization of the objects received through the socket connection.

Specified by:
deserializeObjects in class AbstractNodeIO
Parameters:
bundle - the message header that contains information about the tasks and data provider.
Returns:
an array of objects deserialized from the socket stream.
Throws:
Exception - if an error occurs while deserializing.

writeResults

public void writeResults(JPPFTaskBundle bundle,
                         List<JPPFTask> tasks)
                  throws Exception
Write the execution results to the socket stream.

Specified by:
writeResults in interface NodeIO
Specified by:
writeResults in class AbstractNodeIO
Parameters:
bundle - the task wrapper to send along.
tasks - the list of tasks with their result field updated.
Throws:
Exception - if an error occurs while writtng to the socket stream.
See Also:
NodeIO.writeResults(org.jppf.server.protocol.JPPFTaskBundle, java.util.List)


Copyright © 2005-2010 JPPF Team.