com.caucho.network.listen
Class AbstractSelectManager

java.lang.Object
  extended by com.caucho.network.listen.AbstractSelectManager
Direct Known Subclasses:
JniSelectManager

@Module
public abstract class AbstractSelectManager
extends java.lang.Object

A select manager handles keepalive connections.


Constructor Summary
AbstractSelectManager()
           
 
Method Summary
 void close()
          Closing the manager.
 int getFreeKeepalive()
          Returns the number of available keepalives.
 int getSelectCount()
          Returns the select count.
 int getSelectMax()
          Gets the max.
abstract  boolean keepalive(TcpSocketLink conn)
          Adds a keepalive connection.
 void setSelectMax(int max)
          Sets the max.
 void setSelectTimeout(long period)
          Sets the timeout.
abstract  boolean start()
          Starts the manager.
 boolean stop()
          Stops the manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSelectManager

public AbstractSelectManager()
Method Detail

setSelectTimeout

public void setSelectTimeout(long period)
Sets the timeout.


setSelectMax

public void setSelectMax(int max)
Sets the max.


getSelectMax

public int getSelectMax()
Gets the max.


start

public abstract boolean start()
Starts the manager.


keepalive

public abstract boolean keepalive(TcpSocketLink conn)
Adds a keepalive connection.

Parameters:
conn - the connection to register as keepalive
Returns:
true if the keepalive was successful

getSelectCount

public int getSelectCount()
Returns the select count.


getFreeKeepalive

public int getFreeKeepalive()
Returns the number of available keepalives.


stop

public boolean stop()
Stops the manager.


close

public void close()
Closing the manager.