com.trendrr.oss.networking
Class SelectorThread
java.lang.Object
com.trendrr.oss.networking.SelectorThread
- All Implemented Interfaces:
- java.lang.Runnable
public class SelectorThread
- extends java.lang.Object
- implements java.lang.Runnable
- Author:
- Dustin Norlander
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SelectorThread
public SelectorThread()
throws java.io.IOException
- Throws:
java.io.IOException
registerChannel
public static SelectorThread registerChannel(SocketChannelWrapper wrapper)
throws java.io.IOException
- Throws:
java.io.IOException
register
public void register(SocketChannelWrapper wrapper)
throws java.io.IOException
- Throws:
java.io.IOException
registerChange
public void registerChange(SocketChannelWrapper wrapper)
- registers that something has changed with the wrapper (read or writes waiting, or disconnect).
- Parameters:
wrapper -
run
public void run()
- Specified by:
run in interface java.lang.Runnable
unregister
public void unregister(SocketChannelWrapper wrapper)
- unregisters the wrapper with this selector thread.
it is unnecessary to call this if the wrapper.close() method is invoked.