|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.server.node.AbstractNodeIO
public abstract class AbstractNodeIO
This class performs the I/O operations requested by the JPPFNode, for reading the task bundles and sending the results back.
| Nested Class Summary | |
|---|---|
protected static class |
AbstractNodeIO.BufferList
A pairing of a list of buffers and the total length of their usable data. |
protected class |
AbstractNodeIO.ObjectSerializationTask
The goal of this class is to serialize an object before sending it back to the server, and catch an eventual exception. |
| Field Summary | |
|---|---|
protected JPPFTaskBundle |
currentBundle
The task bundle currently being processed. |
protected JPPFNode |
node
The node who owns this TaskIO. |
protected ObjectSerializer |
serializer
Used to serialize/deserialize tasks and data providers. |
| Constructor Summary | |
|---|---|
AbstractNodeIO(JPPFNode node)
Initialize this TaskIO with the specified node. |
|
| Method Summary | |
|---|---|
protected abstract Object[] |
deserializeObjects()
Perform the deserialization of the objects received through the socket connection. |
protected abstract Object[] |
deserializeObjects(JPPFTaskBundle bundle)
Perform the deserialization of the objects received through the socket connection. |
protected abstract void |
handleReload()
Performs the actions required if reloading the classes is necessary. |
protected Object[] |
readObjects()
Deserialize the objects read from the socket, and reload the appropriate classes if any class change is detected. |
Pair<JPPFTaskBundle,List<JPPFTask>> |
readTask()
Read a task from the socket connection, along with its header information. |
abstract void |
writeResults(JPPFTaskBundle bundle,
List<JPPFTask> tasks)
Write the execution results to the socket stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected JPPFNode node
protected JPPFTaskBundle currentBundle
protected ObjectSerializer serializer
| Constructor Detail |
|---|
public AbstractNodeIO(JPPFNode node)
node - - the node who owns this TaskIO.| Method Detail |
|---|
public Pair<JPPFTaskBundle,List<JPPFTask>> readTask()
throws Exception
readTask in interface NodeIOJPPFTaskBundle and a List of JPPFTask instances.
Exception - if an error is raised while reading the task data.NodeIO.readTask()
protected Object[] readObjects()
throws Exception
InvalidClassException is caught. Upon catching this exception,
the class loader is reinitialized and the class are reloaded.
Exception - if the classes could not be reloaded or an error occurred during deserialization.
protected abstract void handleReload()
throws Exception
Exception - if any error occurs.
protected abstract Object[] deserializeObjects()
throws Exception
Exception - if an error occurs while deserializing.
protected abstract Object[] deserializeObjects(JPPFTaskBundle bundle)
throws Exception
bundle - the message header that contains information about the tasks and data provider.
Exception - if an error occurs while deserializing.
public abstract void writeResults(JPPFTaskBundle bundle,
List<JPPFTask> tasks)
throws Exception
writeResults in interface NodeIObundle - the task wrapper to send along.tasks - the list of tasks with their result field updated.
Exception - if an error occurs while writtng to the socket stream.NodeIO.writeResults(org.jppf.server.protocol.JPPFTaskBundle, java.util.List)
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||