Java Doc for JIoEndpoint.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » tomcat » util » net » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.tomcat.util.net 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tomcat.util.net.JIoEndpoint

JIoEndpoint
public class JIoEndpoint (Code)
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.
author:
   James Duncan Davidson
author:
   Jason Hunter
author:
   James Todd
author:
   Costin Manolache
author:
   Gal Shachor
author:
   Yoav Shapira
author:
   Remy Maucherat

Inner Class :public interface Handler
Inner Class :protected class Acceptor implements Runnable
Inner Class :protected class SocketProcessor implements Runnable
Inner Class :protected class Worker implements Runnable
Inner Class :public class WorkerStack

Field Summary
final public static  StringCERTIFICATE_KEY
     The Request attribute key for the client certificate chain.
final public static  StringCIPHER_SUITE_KEY
     The Request attribute key for the cipher suite.
final public static  StringKEY_SIZE_KEY
     The Request attribute key for the key size.
final public static  StringSESSION_ID_KEY
     The Request attribute key for the session id.
protected  intacceptorThreadCount
     Acceptor thread count.
protected  InetAddressaddress
     Address for the server socket.
protected  intbacklog
     Allows the server developer to specify the backlog that should be used for server sockets.
protected  intcurThreads
     Current worker threads count.
protected  intcurThreadsBusy
     Current worker threads busy count.
protected  booleandaemon
     The default is true - the created threads will be in daemon mode.
protected  Executorexecutor
     External Executor based thread pool.
protected  Handlerhandler
     Handling of accepted sockets.
protected  booleaninitialized
     Track the initialization state of the endpoint.
protected static  Loglog
    
protected  intmaxThreads
     Maximum amount of worker threads.
protected  Stringname
     Name of the thread pool, which will be used for naming child threads.
protected volatile  booleanpaused
     Will be set to true whenever the endpoint is paused.
protected  intport
     Server socket port.
protected volatile  booleanrunning
     Running state of the endpoint.
protected  intsequence
     Sequence number used to generate thread names.
protected  ServerSocketserverSocket
     Associated server socket.
protected  ServerSocketFactoryserverSocketFactory
     Server socket factory.
protected  StringManagersm
    
protected  intsoLinger
     Socket linger.
protected  intsoTimeout
     Socket timeout.
protected  booleantcpNoDelay
     Socket TCP no delay.
protected  intthreadPriority
     Priority of the acceptor and poller threads.
protected  WorkerStackworkers
     Available workers.


Method Summary
protected  WorkercreateWorkerThread()
     Create (or allocate) and return an available processor for use in processing a specific HTTP request, if possible.
public  voiddestroy()
     Deallocate APR memory pools, and close server socket.
public  intgetAcceptorThreadCount()
    
public  InetAddressgetAddress()
    
public  intgetBacklog()
    
public  intgetCurrentThreadCount()
    
public  intgetCurrentThreadsBusy()
    
public  booleangetDaemon()
    
public  ExecutorgetExecutor()
    
public  HandlergetHandler()
    
public  intgetMaxThreads()
    
public  StringgetName()
    
public  intgetPort()
    
public  ServerSocketFactorygetServerSocketFactory()
    
public  intgetSoLinger()
    
public  intgetSoTimeout()
    
public  booleangetTcpNoDelay()
    
public  intgetThreadPriority()
    
protected  WorkergetWorkerThread()
     Return a new worker thread, and block while to worker is available.
public  voidinit()
    
public  booleanisPaused()
    
public  booleanisRunning()
    
protected  WorkernewWorkerThread()
     Create and return a new processor suitable for processing HTTP requests and returning the corresponding responses.
public  voidpause()
    
protected  booleanprocessSocket(Socket socket)
     Process given socket.
protected  voidrecycleWorkerThread(Worker workerThread)
     Recycle the specified Processor so that it can be used again.
public  voidresume()
    
public  voidsetAcceptorThreadCount(int acceptorThreadCount)
    
public  voidsetAddress(InetAddress address)
    
public  voidsetBacklog(int backlog)
    
public  voidsetDaemon(boolean b)
    
public  voidsetExecutor(Executor executor)
    
public  voidsetHandler(Handler handler)
    
public  voidsetMaxThreads(int maxThreads)
    
public  voidsetName(String name)
    
public  voidsetPort(int port)
    
public  voidsetServerSocketFactory(ServerSocketFactory factory)
    
public  voidsetSoLinger(int soLinger)
    
public  voidsetSoTimeout(int soTimeout)
    
protected  booleansetSocketOptions(Socket socket)
     Set the options for the current socket.
public  voidsetTcpNoDelay(boolean tcpNoDelay)
    
public  voidsetThreadPriority(int threadPriority)
    
public  voidstart()
    
public  voidstop()
    
protected  voidunlockAccept()
     Unlock the accept by using a local connection.

Field Detail
CERTIFICATE_KEY
final public static String CERTIFICATE_KEY(Code)
The Request attribute key for the client certificate chain.



CIPHER_SUITE_KEY
final public static String CIPHER_SUITE_KEY(Code)
The Request attribute key for the cipher suite.



KEY_SIZE_KEY
final public static String KEY_SIZE_KEY(Code)
The Request attribute key for the key size.



SESSION_ID_KEY
final public static String SESSION_ID_KEY(Code)
The Request attribute key for the session id. This one is a Tomcat extension to the Servlet spec.



acceptorThreadCount
protected int acceptorThreadCount(Code)
Acceptor thread count.



address
protected InetAddress address(Code)
Address for the server socket.



backlog
protected int backlog(Code)
Allows the server developer to specify the backlog that should be used for server sockets. By default, this value is 100.



curThreads
protected int curThreads(Code)
Current worker threads count.



curThreadsBusy
protected int curThreadsBusy(Code)
Current worker threads busy count.



daemon
protected boolean daemon(Code)
The default is true - the created threads will be in daemon mode. If set to false, the control thread will not be daemon - and will keep the process alive.



executor
protected Executor executor(Code)
External Executor based thread pool.



handler
protected Handler handler(Code)
Handling of accepted sockets.



initialized
protected boolean initialized(Code)
Track the initialization state of the endpoint.



log
protected static Log log(Code)



maxThreads
protected int maxThreads(Code)
Maximum amount of worker threads.



name
protected String name(Code)
Name of the thread pool, which will be used for naming child threads.



paused
protected volatile boolean paused(Code)
Will be set to true whenever the endpoint is paused.



port
protected int port(Code)
Server socket port.



running
protected volatile boolean running(Code)
Running state of the endpoint.



sequence
protected int sequence(Code)
Sequence number used to generate thread names.



serverSocket
protected ServerSocket serverSocket(Code)
Associated server socket.



serverSocketFactory
protected ServerSocketFactory serverSocketFactory(Code)
Server socket factory.



sm
protected StringManager sm(Code)



soLinger
protected int soLinger(Code)
Socket linger.



soTimeout
protected int soTimeout(Code)
Socket timeout.



tcpNoDelay
protected boolean tcpNoDelay(Code)
Socket TCP no delay.



threadPriority
protected int threadPriority(Code)
Priority of the acceptor and poller threads.



workers
protected WorkerStack workers(Code)
Available workers.





Method Detail
createWorkerThread
protected Worker createWorkerThread()(Code)
Create (or allocate) and return an available processor for use in processing a specific HTTP request, if possible. If the maximum allowed processors have already been created and are in use, return null instead.



destroy
public void destroy() throws Exception(Code)
Deallocate APR memory pools, and close server socket.



getAcceptorThreadCount
public int getAcceptorThreadCount()(Code)



getAddress
public InetAddress getAddress()(Code)



getBacklog
public int getBacklog()(Code)



getCurrentThreadCount
public int getCurrentThreadCount()(Code)



getCurrentThreadsBusy
public int getCurrentThreadsBusy()(Code)



getDaemon
public boolean getDaemon()(Code)



getExecutor
public Executor getExecutor()(Code)



getHandler
public Handler getHandler()(Code)



getMaxThreads
public int getMaxThreads()(Code)



getName
public String getName()(Code)



getPort
public int getPort()(Code)



getServerSocketFactory
public ServerSocketFactory getServerSocketFactory()(Code)



getSoLinger
public int getSoLinger()(Code)



getSoTimeout
public int getSoTimeout()(Code)



getTcpNoDelay
public boolean getTcpNoDelay()(Code)



getThreadPriority
public int getThreadPriority()(Code)



getWorkerThread
protected Worker getWorkerThread()(Code)
Return a new worker thread, and block while to worker is available.



init
public void init() throws Exception(Code)



isPaused
public boolean isPaused()(Code)



isRunning
public boolean isRunning()(Code)



newWorkerThread
protected Worker newWorkerThread()(Code)
Create and return a new processor suitable for processing HTTP requests and returning the corresponding responses.



pause
public void pause()(Code)



processSocket
protected boolean processSocket(Socket socket)(Code)
Process given socket.



recycleWorkerThread
protected void recycleWorkerThread(Worker workerThread)(Code)
Recycle the specified Processor so that it can be used again.
Parameters:
  workerThread - The processor to be recycled



resume
public void resume()(Code)



setAcceptorThreadCount
public void setAcceptorThreadCount(int acceptorThreadCount)(Code)



setAddress
public void setAddress(InetAddress address)(Code)



setBacklog
public void setBacklog(int backlog)(Code)



setDaemon
public void setDaemon(boolean b)(Code)



setExecutor
public void setExecutor(Executor executor)(Code)



setHandler
public void setHandler(Handler handler)(Code)



setMaxThreads
public void setMaxThreads(int maxThreads)(Code)



setName
public void setName(String name)(Code)



setPort
public void setPort(int port)(Code)



setServerSocketFactory
public void setServerSocketFactory(ServerSocketFactory factory)(Code)



setSoLinger
public void setSoLinger(int soLinger)(Code)



setSoTimeout
public void setSoTimeout(int soTimeout)(Code)



setSocketOptions
protected boolean setSocketOptions(Socket socket)(Code)
Set the options for the current socket.



setTcpNoDelay
public void setTcpNoDelay(boolean tcpNoDelay)(Code)



setThreadPriority
public void setThreadPriority(int threadPriority)(Code)



start
public void start() throws Exception(Code)



stop
public void stop()(Code)



unlockAccept
protected void unlockAccept()(Code)
Unlock the accept by using a local connection.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.