Package com.jme3.network.kernel.tcp
Class SelectorKernel.SelectorThread
java.lang.Object
java.lang.Thread
com.jme3.network.kernel.tcp.SelectorKernel.SelectorThread
- All Implemented Interfaces:
Runnable
- Enclosing class:
- SelectorKernel
This class is purposely tucked neatly away because
messing with the selector from other threads for any
reason is very bad. This is the safest architecture.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
accept
(SelectionKey key) protected void
protected void
cancel
(SelectionKey key, SocketChannel c) void
close()
void
connect()
protected void
read
(SelectionKey key) void
run()
protected void
select()
protected void
protected void
protected void
write
(SelectionKey key) Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
SelectorThread
public SelectorThread()
-
-
Method Details
-
connect
- Throws:
IOException
-
close
- Throws:
IOException
InterruptedException
-
wakeupSelector
protected void wakeupSelector() -
setupSelectorOptions
protected void setupSelectorOptions() -
accept
- Throws:
IOException
-
cancel
- Throws:
IOException
-
cancel
- Throws:
IOException
-
read
- Throws:
IOException
-
write
- Throws:
IOException
-
select
- Throws:
IOException
-
run
public void run()
-