Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » tomcat » util » net » [javadoc | source]
org.apache.tomcat.util.net
public class: PoolTcpEndpoint [javadoc | source]
java.lang.Object
   org.apache.tomcat.util.net.PoolTcpEndpoint

All Implemented Interfaces:
    Runnable

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
static  Log log     
static final  int debug     
protected  boolean tcpNoDelay     
protected  int linger     
protected  int socketTimeout     
 TcpConnectionHandler handler     
 ThreadPoolRunnable listener     
 ThreadPool tp     
Constructor:
 public PoolTcpEndpoint() 
 public PoolTcpEndpoint(ThreadPool tp) 
Method from org.apache.tomcat.util.net.PoolTcpEndpoint Summary:
acceptSocket,   closeServerSocket,   getAddress,   getBacklog,   getConnectionHandler,   getCurrentThreadCount,   getCurrentThreadsBusy,   getMaxSpareThreads,   getMaxThreads,   getMinSpareThreads,   getPort,   getServerSoTimeout,   getServerSocketFactory,   getSoLinger,   getSoTimeout,   getStrategy,   getTcpNoDelay,   getThreadPriority,   initEndpoint,   isPaused,   isRunning,   pauseEndpoint,   processSocket,   recycleWorkerThread,   resumeEndpoint,   run,   setAddress,   setBacklog,   setConnectionHandler,   setMaxSpareThreads,   setMaxThreads,   setMinSpareThreads,   setPort,   setServerSoTimeout,   setServerSocket,   setServerSocketFactory,   setServerTimeout,   setSoLinger,   setSoTimeout,   setSocketOptions,   setStrategy,   setTcpNoDelay,   setThreadPriority,   startEndpoint,   stopEndpoint,   unlockAccept
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tomcat.util.net.PoolTcpEndpoint Detail:
 Socket acceptSocket() 
 protected  void closeServerSocket() 
 public InetAddress getAddress() 
 public int getBacklog() 
 public TcpConnectionHandler getConnectionHandler() 
 public int getCurrentThreadCount() 
 public int getCurrentThreadsBusy() 
 public int getMaxSpareThreads() 
 public int getMaxThreads() 
 public int getMinSpareThreads() 
 public int getPort() 
 public int getServerSoTimeout() 
 ServerSocketFactory getServerSocketFactory() 
 public int getSoLinger() 
 public int getSoTimeout() 
 public String getStrategy() 
 public boolean getTcpNoDelay() 
 public int getThreadPriority() 
 public  void initEndpoint() throws IOException, InstantiationException 
 public boolean isPaused() 
 public boolean isRunning() 
 public  void pauseEndpoint() 
  void processSocket(Socket s,
    TcpConnection con,
    Object[] threadData) 
  void recycleWorkerThread(MasterSlaveWorkerThread workerThread) 
    Recycle the specified Processor so that it can be used again.
 public  void resumeEndpoint() 
 public  void run() 
    The background thread that listens for incoming TCP/IP connections and hands them off to an appropriate processor.
 public  void setAddress(InetAddress inet) 
 public  void setBacklog(int backlog) 
    Allows the server developer to specify the backlog that should be used for server sockets. By default, this value is 100.
 public  void setConnectionHandler(TcpConnectionHandler handler) 
 public  void setMaxSpareThreads(int maxThreads) 
 public  void setMaxThreads(int maxThreads) 
 public  void setMinSpareThreads(int minThreads) 
 public  void setPort(int port) 
 public  void setServerSoTimeout(int i) 
 public  void setServerSocket(ServerSocket ss) 
 public  void setServerSocketFactory(ServerSocketFactory factory) 
 public  void setServerTimeout(int timeout) 
    Sets the timeout in ms of the server sockets created by this server. This method allows the developer to make servers more or less responsive to having their server sockets shut down.

    By default this value is 1000ms.

 public  void setSoLinger(int i) 
 public  void setSoTimeout(int i) 
  void setSocketOptions(Socket socket) throws SocketException 
 public  void setStrategy(String strategy) 
 public  void setTcpNoDelay(boolean b) 
 public  void setThreadPriority(int threadPriority) 
 public  void startEndpoint() throws IOException, InstantiationException 
 public  void stopEndpoint() 
 protected  void unlockAccept()