|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tomcat.util.net.PoolTcpEndpoint
Handle incoming TCP connections. This class implement a simple server model: one listener thread accepts on a socket and creates a new worker thread for each incoming connection. More advanced Endpoints will reuse the threads, use queues, etc.
Field Summary | |
protected int |
linger
|
protected int |
socketTimeout
|
protected boolean |
tcpNoDelay
|
Constructor Summary | |
PoolTcpEndpoint()
|
|
PoolTcpEndpoint(ThreadPool tp)
|
Method Summary | |
protected void |
closeServerSocket()
|
java.net.InetAddress |
getAddress()
|
int |
getBacklog()
|
TcpConnectionHandler |
getConnectionHandler()
|
int |
getMaxSpareThreads()
|
int |
getMaxThreads()
|
int |
getMinSpareThreads()
|
int |
getPort()
|
int |
getServerSoTimeout()
|
int |
getSoLinger()
|
int |
getSoTimeout()
|
boolean |
getTcpNoDelay()
|
int |
getThreadPriority()
|
void |
initEndpoint()
|
boolean |
isPaused()
|
boolean |
isPoolOn()
|
boolean |
isRunning()
|
void |
log(java.lang.String msg)
Deprecated. |
void |
log(java.lang.String msg,
int level)
Deprecated. |
void |
log(java.lang.String msg,
java.lang.Throwable t)
Deprecated. |
void |
log(java.lang.String msg,
java.lang.Throwable t,
int level)
Deprecated. |
void |
pauseEndpoint()
|
void |
resumeEndpoint()
|
void |
setAddress(java.net.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(java.net.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 |
setThreadPriority(int threadPriority)
|
void |
startEndpoint()
|
void |
stopEndpoint()
|
protected void |
unlockAccept()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean tcpNoDelay
protected int linger
protected int socketTimeout
Constructor Detail |
public PoolTcpEndpoint()
public PoolTcpEndpoint(ThreadPool tp)
Method Detail |
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 void setThreadPriority(int threadPriority)
public int getThreadPriority()
public int getPort()
public void setPort(int port)
public java.net.InetAddress getAddress()
public void setAddress(java.net.InetAddress inet)
public void setServerSocket(java.net.ServerSocket ss)
public void setServerSocketFactory(ServerSocketFactory factory)
public void setConnectionHandler(TcpConnectionHandler handler)
public TcpConnectionHandler getConnectionHandler()
public boolean isRunning()
public boolean isPaused()
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 java.io.IOException, java.lang.InstantiationException
java.io.IOException
java.lang.InstantiationException
public void startEndpoint() throws java.io.IOException, java.lang.InstantiationException
java.io.IOException
java.lang.InstantiationException
public void pauseEndpoint()
public void resumeEndpoint()
public void stopEndpoint()
protected void closeServerSocket()
protected void unlockAccept()
public void log(java.lang.String msg)
public void log(java.lang.String msg, java.lang.Throwable t)
public void log(java.lang.String msg, int level)
public void log(java.lang.String msg, java.lang.Throwable t, int level)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |