Class jls.net.SelectorThread

This class provides selector facilities hidding the selection by using a thread and a pollable event.
Defined in: SelectorThread.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a selector thread.
Method Summary
Method Attributes Method Name and Description
 
Returns the selector.
 
register(socket, handle, mode)
Registers a socket in this selector thread.
 
Starts this selector thread.
 
stop()
Stops this selector thread.
 
Removes a socket from this selector thread.
Class Detail
jls.net.SelectorThread()
Creates a selector thread.
See:
jls.net.Selector
jls.lang.Thread
jls.net.PollableEvent
Method Detail
{jls.net.Selector} getSelector()
Returns the selector.
Returns:
{jls.net.Selector} The selector.

{Object} register(socket, handle, mode)
Registers a socket in this selector thread.
Parameters:
{jls.net.Socket} socket
The socket to register.
{Function} handle
The handle for this registration.
{Number} mode Optional
The interest set for this registration.
Returns:
{Object} The selection key.

{jls.net.SelectorThread} start()
Starts this selector thread.
Returns:
{jls.net.SelectorThread} This selector thread.

{jls.net.SelectorThread} stop()
Stops this selector thread.
Returns:
{jls.net.SelectorThread} This selector thread.

{jls.net.SelectorThread} unregister(key)
Removes a socket from this selector thread.
Parameters:
{Object} key
The selection key.
Returns:
{jls.net.SelectorThread} This selector thread.

Documentation generated by JsDoc Toolkit 2.3.2 on Sat Jan 08 2011 02:00:14 GMT+0100 (CET)