public class NetworkListenSystem extends AbstractResinSubSystem implements AlarmListener
| Modifier and Type | Field and Description |
|---|---|
static int |
START_PRIORITY_AT_BEGIN |
static int |
START_PRIORITY_AT_END |
START_PRIORITY_CACHE_SERVICE, START_PRIORITY_CLASSLOADER, START_PRIORITY_CLUSTER_SERVICE, START_PRIORITY_DATABASE_SYSTEM, START_PRIORITY_DEFAULT, START_PRIORITY_ENV_SYSTEM, START_PRIORITY_NETWORK_CLUSTER, STOP_PRIORITY_CLASSLOADER| Modifier and Type | Method and Description |
|---|---|
void |
addListener(TcpPort listener) |
void |
bind(java.lang.String address,
int port,
QServerSocket ss) |
static NetworkListenSystem |
createAndAddService(CloudServer cloudServer) |
TcpSocketLink |
findConnectionByThreadId(long threadId)
Finds the TcpConnection given the threadId
|
TcpPort |
getClusterListener()
Returns the cluster listener, if in a clustered environment.
|
static NetworkListenSystem |
getCurrent() |
java.util.Collection<TcpPort> |
getListeners()
Returns the
TcpPorts for this server. |
int |
getStartPriority()
Returns the start priority of the service, used to determine which
services to start first.
|
void |
handleAlarm(Alarm alarm)
Handles the alarm.
|
boolean |
isBindPortsAfterStart()
If true, ports are bound at end.
|
void |
setBindPortsAfterStart(boolean bindAtEnd)
If true, ports are bound at end.
|
void |
start()
Bind the ports.
|
void |
stop()
Closes the server.
|
destroy, getStopPriority, isActive, preCreate, toStringpublic static final int START_PRIORITY_AT_BEGIN
public static final int START_PRIORITY_AT_END
public static NetworkListenSystem createAndAddService(CloudServer cloudServer)
public static NetworkListenSystem getCurrent()
public TcpPort getClusterListener()
public void addListener(TcpPort listener)
public void setBindPortsAfterStart(boolean bindAtEnd)
public boolean isBindPortsAfterStart()
public java.util.Collection<TcpPort> getListeners()
TcpPorts for this server.public void bind(java.lang.String address,
int port,
QServerSocket ss)
throws java.lang.Exception
java.lang.Exceptionpublic TcpSocketLink findConnectionByThreadId(long threadId)
public int getStartPriority()
ResinSubSystemgetStartPriority in interface ResinSubSystemgetStartPriority in class AbstractResinSubSystempublic void start()
throws java.lang.Exception
start in interface ResinSubSystemstart in class AbstractResinSubSystemjava.lang.Exceptionpublic void handleAlarm(Alarm alarm)
handleAlarm in interface AlarmListenerpublic void stop()
stop in interface ResinSubSystemstop in class AbstractResinSubSystem