org.jppf.server.nio
Class SimpleNioContext<S extends Enum<S>>
java.lang.Object
org.jppf.server.nio.AbstractNioContext<S>
org.jppf.server.nio.SimpleNioContext<S>
- Type Parameters:
S - the type of states associated with this context.
- All Implemented Interfaces:
- NioContext<S>
- Direct Known Subclasses:
- ClassContext, MultiplexerContext, MultiplexerContext
public abstract class SimpleNioContext<S extends Enum<S>>
- extends AbstractNioContext<S>
Context associated with an open socket channel.
- Author:
- Laurent Cohen
| 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 |
SimpleNioContext
public SimpleNioContext()
readMessage
public boolean readMessage(ChannelWrapper<?> wrapper)
throws Exception
- Read data from a channel.
- 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.
- 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.