org.jppf.server.nio.nodeserver
Class LocalNodeContext
java.lang.Object
org.jppf.server.nio.AbstractNioContext<NodeState>
org.jppf.server.nio.nodeserver.AbstractNodeContext
org.jppf.server.nio.nodeserver.LocalNodeContext
- All Implemented Interfaces:
- NioContext<NodeState>
public class LocalNodeContext
- extends AbstractNodeContext
Context associated with a channel serving tasks to a local (in-VM) node.
- Author:
- Laurent Cohen
| Methods inherited from class org.jppf.server.nio.nodeserver.AbstractNodeContext |
checkBundler, deserializeBundle, getBundle, getBundler, getNodeMessage, getNodeUuid, handleException, isJobCanceled, isPeer, resubmitBundle, serializeBundle, setBundle, setBundler, setJobCanceled, setNodeUuid, setPeer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalNodeContext
public LocalNodeContext()
newMessage
public AbstractNodeMessage newMessage()
- Create a new message..
- Specified by:
newMessage in class AbstractNodeContext
- Returns:
- an
AbstractNodeMessage instance.
readMessage
public boolean readMessage(ChannelWrapper<?> channel)
throws Exception
- Read data from a channel.
- Specified by:
readMessage in interface NioContext<NodeState>- Overrides:
readMessage in class AbstractNodeContext
- Parameters:
channel - the channel to read the data from.
- Returns:
- true if all the data has been read, false otherwise.
- Throws:
Exception - if an error occurs while reading the data.
writeMessage
public boolean writeMessage(ChannelWrapper<?> channel)
throws Exception
- Write data to a channel.
- Specified by:
writeMessage in interface NioContext<NodeState>- Overrides:
writeMessage in class AbstractNodeContext
- Parameters:
channel - the channel to write the data to.
- Returns:
- true if all the data has been written, false otherwise.
- Throws:
Exception - if an error occurs while writing the data.
setNodeMessage
public void setNodeMessage(AbstractNodeMessage nodeMessage,
ChannelWrapper<?> channel)
- Set the message wrapping the data sent or received over the socket channel.
- Overrides:
setNodeMessage in class AbstractNodeContext
- Parameters:
nodeMessage - a NodeMessage instance.channel - reference to the channel.
setState
public void setState(NodeState state)
- Set the current state of the channel this context is associated with.
- Specified by:
setState in interface NioContext<NodeState>- Overrides:
setState in class AbstractNioContext<NodeState>
- Parameters:
state - a state enum value.
Copyright © 2005-2010 JPPF Team.