org.jppf.server.nio.classloader
Class LocalClassContext
java.lang.Object
org.jppf.server.nio.AbstractNioContext<S>
org.jppf.server.nio.SimpleNioContext<ClassState>
org.jppf.server.nio.classloader.ClassContext
org.jppf.server.nio.classloader.LocalClassContext
- All Implemented Interfaces:
- NioContext<ClassState>
public class LocalClassContext
- extends ClassContext
Context object associated with a socket channel used by the class server of the JPPF driver.
- Author:
- Laurent Cohen
| Methods inherited from class org.jppf.server.nio.classloader.ClassContext |
addRequest, getCurrentRequest, getNbPendingRequests, getPendingRequests, getResource, handleException, handleProviderError, isProvider, resetNodeState, sendNullResponse, setCurrentRequest, setPendingRequests, setProvider, setResource |
| Methods inherited from class org.jppf.server.nio.AbstractNioContext |
getChannel, getConnectionUuid, getMessage, getShortClassName, getState, getUuid, setChannel, setConnectionUuid, setMessage, setState, setUuid |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalClassContext
public LocalClassContext()
serializeResource
public void serializeResource(ChannelWrapper<?> wrapper)
throws Exception
- Serialize a resource wrapper to an array of bytes.
- Overrides:
serializeResource in class ClassContext
- Parameters:
wrapper - the channel through which the resource is sent.
- Throws:
Exception - if an error occurs while serializing.
deserializeResource
public JPPFResourceWrapper deserializeResource()
throws Exception
- Deserialize a resource wrapper from an array of bytes.
- Overrides:
deserializeResource in class ClassContext
- Returns:
- a
JPPFResourceWrapper instance.
- Throws:
Exception - if an error occurs while deserializing.
readMessage
public boolean readMessage(ChannelWrapper<?> wrapper)
throws Exception
- Read data from a channel.
- Specified by:
readMessage in interface NioContext<ClassState>- Overrides:
readMessage in class SimpleNioContext<ClassState>
- Parameters:
wrapper - 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<?> wrapper)
throws Exception
- Write data to a channel.
- Specified by:
writeMessage in interface NioContext<ClassState>- Overrides:
writeMessage in class SimpleNioContext<ClassState>
- Parameters:
wrapper - 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.
Copyright © 2005-2010 JPPF Team.