com.caucho.network.listen
Class ListenService

java.lang.Object
  extended by com.caucho.env.service.AbstractResinSubSystem
      extended by com.caucho.network.listen.ListenService
All Implemented Interfaces:
ResinSubSystem

public class ListenService
extends AbstractResinSubSystem

The socket listen service, which accepts sockets and dispatches them to protocols.


Field Summary
static int START_PRIORITY_CLUSTER
           
static int START_PRIORITY_LISTEN
           
 
Fields inherited from interface com.caucho.env.service.ResinSubSystem
START_PRIORITY_CACHE_SERVICE, START_PRIORITY_CLASSLOADER, START_PRIORITY_CLUSTER_SERVICE, START_PRIORITY_DEFAULT, START_PRIORITY_ENV_SYSTEM, START_PRIORITY_NETWORK_CLUSTER
 
Method Summary
 void addListener(TcpSocketLinkListener listener)
          Registers a listener with the service.
static ListenService createAndAddService()
           
 TcpSocketLinkListener createListener()
          Creates a listener with the defaults applied.
static ListenService getCurrent()
           
 java.util.Collection<TcpSocketLinkListener> getListeners()
          Returns the TcpSocketLinkListeners for this server.
 int getStartPriority()
          Returns the start priority of the service, used to determine which services to start first.
 void start()
          Starts the service.
 void stop()
          Stops the service.
 
Methods inherited from class com.caucho.env.service.AbstractResinSubSystem
destroy, getStopPriority, preCreate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

START_PRIORITY_LISTEN

public static final int START_PRIORITY_LISTEN
See Also:
Constant Field Values

START_PRIORITY_CLUSTER

public static final int START_PRIORITY_CLUSTER
See Also:
Constant Field Values
Method Detail

createAndAddService

public static ListenService createAndAddService()

getCurrent

public static ListenService getCurrent()

createListener

public TcpSocketLinkListener createListener()
Creates a listener with the defaults applied. The listener will not be registered until addNotificationListener is called.


addListener

public void addListener(TcpSocketLinkListener listener)
Registers a listener with the service.


getListeners

public java.util.Collection<TcpSocketLinkListener> getListeners()
Returns the TcpSocketLinkListeners for this server.


getStartPriority

public int getStartPriority()
Description copied from interface: ResinSubSystem
Returns the start priority of the service, used to determine which services to start first.

Specified by:
getStartPriority in interface ResinSubSystem
Overrides:
getStartPriority in class AbstractResinSubSystem

start

public void start()
           throws java.lang.Exception
Description copied from interface: ResinSubSystem
Starts the service.

Specified by:
start in interface ResinSubSystem
Overrides:
start in class AbstractResinSubSystem
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Description copied from interface: ResinSubSystem
Stops the service.

Specified by:
stop in interface ResinSubSystem
Overrides:
stop in class AbstractResinSubSystem
Throws:
java.lang.Exception