|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
fabric.net.ChannelMultiplexerThread
public final class ChannelMultiplexerThread
Multiplexes several channels over a single channel.
Nested Class Summary | |
---|---|
static interface |
ChannelMultiplexerThread.CallbackHandler
|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
BUFFER_SIZE
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ChannelMultiplexerThread(ChannelMultiplexerThread.CallbackHandler handler,
java.lang.String name,
java.nio.channels.SocketChannel socketChannel)
Creates a new thread that will multiplex/demultiplex multiple streams over the given socket channel. |
Method Summary | |
---|---|
void |
registerChannels(int streamID,
java.nio.channels.Pipe.SourceChannel source,
java.nio.channels.Pipe.SinkChannel sink)
Registers a pair of channels for communicating with a message-handler thread, assigning them a designated streamID, and registers the source channel with the selector. |
int |
registerChannels(java.nio.channels.Pipe.SourceChannel source,
java.nio.channels.Pipe.SinkChannel sink)
Registers a pair of channels for communicating with a message-handler thread, assigning them a fresh streamID, and registers the source channel with the selector. |
void |
run()
|
void |
shutdown()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int BUFFER_SIZE
Constructor Detail |
---|
public ChannelMultiplexerThread(ChannelMultiplexerThread.CallbackHandler handler, java.lang.String name, java.nio.channels.SocketChannel socketChannel) throws java.io.IOException
handler
- a handler for callbacks.name
- the name of the thread.socketChannel
- the socket channel to use.
java.io.IOException
Method Detail |
---|
public void shutdown()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void registerChannels(int streamID, java.nio.channels.Pipe.SourceChannel source, java.nio.channels.Pipe.SinkChannel sink) throws java.io.IOException
java.io.IOException
public int registerChannels(java.nio.channels.Pipe.SourceChannel source, java.nio.channels.Pipe.SinkChannel sink) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |