public class PoolTcpEndpoint extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
linger |
protected int |
socketTimeout |
protected boolean |
tcpNoDelay |
| Constructor and Description |
|---|
PoolTcpEndpoint() |
PoolTcpEndpoint(ThreadPool tp) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeServerSocket() |
InetAddress |
getAddress() |
int |
getBacklog() |
TcpConnectionHandler |
getConnectionHandler() |
int |
getMaxSpareThreads() |
int |
getMaxThreads() |
int |
getMinSpareThreads() |
int |
getPort() |
int |
getServerSoTimeout() |
int |
getSoLinger() |
int |
getSoTimeout() |
boolean |
getTcpNoDelay() |
void |
initEndpoint() |
boolean |
isPoolOn() |
boolean |
isRunning() |
void |
log(String msg)
Deprecated.
|
void |
log(String msg,
int level)
Deprecated.
|
void |
log(String msg,
Throwable t)
Deprecated.
|
void |
log(String msg,
Throwable t,
int level)
Deprecated.
|
void |
setAddress(InetAddress inet) |
void |
setBacklog(int backlog)
Allows the server developer to specify the backlog that
should be used for server sockets.
|
void |
setConnectionHandler(TcpConnectionHandler handler) |
void |
setMaxSpareThreads(int maxThreads) |
void |
setMaxThreads(int maxThreads) |
void |
setMinSpareThreads(int minThreads) |
void |
setPoolOn(boolean isPool) |
void |
setPort(int port) |
void |
setServerSocket(ServerSocket ss) |
void |
setServerSocketFactory(ServerSocketFactory factory) |
void |
setServerSoTimeout(int i) |
void |
setServerTimeout(int timeout)
Sets the timeout in ms of the server sockets created by this
server.
|
void |
setSoLinger(int i) |
void |
setSoTimeout(int i) |
void |
setTcpNoDelay(boolean b) |
void |
startEndpoint() |
void |
stopEndpoint() |
protected boolean tcpNoDelay
protected int linger
protected int socketTimeout
public PoolTcpEndpoint()
public PoolTcpEndpoint(ThreadPool tp)
public void setPoolOn(boolean isPool)
public boolean isPoolOn()
public void setMaxThreads(int maxThreads)
public int getMaxThreads()
public void setMaxSpareThreads(int maxThreads)
public int getMaxSpareThreads()
public void setMinSpareThreads(int minThreads)
public int getMinSpareThreads()
public int getPort()
public void setPort(int port)
public InetAddress getAddress()
public void setAddress(InetAddress inet)
public void setServerSocket(ServerSocket ss)
public void setServerSocketFactory(ServerSocketFactory factory)
public void setConnectionHandler(TcpConnectionHandler handler)
public TcpConnectionHandler getConnectionHandler()
public boolean isRunning()
public void setBacklog(int backlog)
public int getBacklog()
public void setServerTimeout(int timeout)
By default this value is 1000ms.
public boolean getTcpNoDelay()
public void setTcpNoDelay(boolean b)
public int getSoLinger()
public void setSoLinger(int i)
public int getSoTimeout()
public void setSoTimeout(int i)
public int getServerSoTimeout()
public void setServerSoTimeout(int i)
public void initEndpoint()
throws IOException,
InstantiationException
IOExceptionInstantiationExceptionpublic void startEndpoint()
throws IOException,
InstantiationException
IOExceptionInstantiationExceptionpublic void stopEndpoint()
protected void closeServerSocket()
public void log(String msg)
public void log(String msg, int level)
Copyright © 2005–2017 Oracle Corporation. All rights reserved.