public class TcpServer extends Object implements TcpServerMBean
Modifier and Type | Class and Description |
---|---|
static class |
TcpServer.Monitor |
Modifier and Type | Field and Description |
---|---|
private ServerSocket |
listen |
private TcpServer.Monitor[] |
monitors |
private AgentId |
serverId |
Constructor and Description |
---|
TcpServer(ServerSocket listen,
int poolSize,
AgentId serverId) |
Modifier and Type | Method and Description |
---|---|
ServerSocket |
getListen() |
int |
getListenPort()
Gets the listen port of the server.
|
int |
getPoolSize()
Gets the number of threads of the pool.
|
AgentId |
getServerId() |
void |
start() |
void |
stop() |
private volatile ServerSocket listen
private TcpServer.Monitor[] monitors
private AgentId serverId
public TcpServer(ServerSocket listen, int poolSize, AgentId serverId)
public int getPoolSize()
getPoolSize
in interface TcpServerMBean
public int getListenPort()
getListenPort
in interface TcpServerMBean
public final void start()
public final void stop()
public final ServerSocket getListen()
public final AgentId getServerId()
Copyright © 2023 ScalAgent D.T.. All rights reserved.