org.apache.tomcat.util.net
public class PoolTcpEndpoint extends java.lang.Object implements java.lang.Runnable
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() |
java.net.InetAddress |
getAddress() |
int |
getBacklog() |
TcpConnectionHandler |
getConnectionHandler() |
int |
getCurrentThreadCount() |
int |
getCurrentThreadsBusy() |
int |
getMaxSpareThreads() |
int |
getMaxThreads() |
int |
getMinSpareThreads() |
int |
getPort() |
int |
getServerSoTimeout() |
int |
getSoLinger() |
int |
getSoTimeout() |
java.lang.String |
getStrategy() |
boolean |
getTcpNoDelay() |
int |
getThreadPriority() |
void |
initEndpoint() |
boolean |
isPaused() |
boolean |
isRunning() |
void |
pauseEndpoint() |
void |
resumeEndpoint() |
void |
run()
The background thread that listens for incoming TCP/IP connections and
hands them off to an appropriate processor.
|
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 |
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 |
setStrategy(java.lang.String strategy) |
void |
setTcpNoDelay(boolean b) |
void |
setThreadPriority(int threadPriority) |
void |
startEndpoint() |
void |
stopEndpoint() |
protected void |
unlockAccept() |
protected boolean tcpNoDelay
protected int linger
protected int socketTimeout
public PoolTcpEndpoint()
public PoolTcpEndpoint(ThreadPool tp)
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 java.lang.String getStrategy()
public void setStrategy(java.lang.String strategy)
public int getCurrentThreadCount()
public int getCurrentThreadsBusy()
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 run()
run
in interface java.lang.Runnable
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.