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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaccept(SelectionKey key) protected voidprotected voidcancel(SelectionKey key, SocketChannel c) voidclose()voidconnect()protected voidread(SelectionKey key) voidrun()protected voidselect()protected voidprotected voidprotected voidwrite(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:
IOExceptionInterruptedException
-
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()
-