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
TcpPort s 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, toString
public 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()
TcpPort
s for this server.public void bind(java.lang.String address, int port, QServerSocket ss) throws java.lang.Exception
java.lang.Exception
public TcpSocketLink findConnectionByThreadId(long threadId)
public int getStartPriority()
ResinSubSystem
getStartPriority
in interface ResinSubSystem
getStartPriority
in class AbstractResinSubSystem
public void start() throws java.lang.Exception
start
in interface ResinSubSystem
start
in class AbstractResinSubSystem
java.lang.Exception
public void handleAlarm(Alarm alarm)
handleAlarm
in interface AlarmListener
public void stop()
stop
in interface ResinSubSystem
stop
in class AbstractResinSubSystem