org.restlet.engine.io
Class SelectorFactory

java.lang.Object
  extended by org.restlet.engine.io.SelectorFactory

public class SelectorFactory
extends Object

Factory used to dispatch/share Selector.

Author:
Jean-Francois Arcand

Field Summary
static int MAX_ATTEMPTS
          The number of attempts to find an available selector.
static int MAX_SELECTORS
          The maximum number of Selector to create.
static long TIMEOUT
          The timeout before we exit.
 
Constructor Summary
SelectorFactory()
           
 
Method Summary
static Selector getSelector()
          Get an exclusive Selector.
static void returnSelector(Selector selector)
          Returns the Selector to the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_SELECTORS

public static final int MAX_SELECTORS
The maximum number of Selector to create.

See Also:
Constant Field Values

MAX_ATTEMPTS

public static final int MAX_ATTEMPTS
The number of attempts to find an available selector.

See Also:
Constant Field Values

TIMEOUT

public static final long TIMEOUT
The timeout before we exit.

See Also:
Constant Field Values
Constructor Detail

SelectorFactory

public SelectorFactory()
Method Detail

getSelector

public static final Selector getSelector()
Get an exclusive Selector.

Returns:
An exclusive Selector.

returnSelector

public static final void returnSelector(Selector selector)
Returns the Selector to the cache.

Parameters:
selector - The Selector to return.


Copyright © 2005-2013 Restlet.