Java Doc for Connector.java in  » Sevlet-Container » tomcat-catalina » org » apache » catalina » 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 » tomcat catalina » org.apache.catalina 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.catalina.Connector

All known Subclasses:   org.apache.coyote.tomcat5.CoyoteConnector,
Connector
public interface Connector (Code)
A Connector is a component responsible receiving requests from, and returning responses to, a client application. A Connector performs the following general logic:
  • Receive a request from the client application.
  • Create (or allocate from a pool) appropriate Request and Response instances, and populate their properties based on the contents of the received request, as described below.
    • For all Requests, the connector, protocol, remoteAddr, response, scheme, secure, serverName, serverPort and stream properties MUST be set. The contentLength and contentType properties are also generally set.
    • For HttpRequests, the method, queryString, requestedSessionCookie, requestedSessionId, requestedSessionURL, requestURI, and secure properties MUST be set. In addition, the various addXxx methods must be called to record the presence of cookies, headers, and locales in the original request.
    • For all Responses, the connector, request, and stream properties MUST be set.
    • No additional headers must be set by the Connector for HttpResponses.
  • Identify an appropriate Container to use for processing this request. For a stand alone Catalina installation, this will probably be a (singleton) Engine implementation. For a Connector attaching Catalina to a web server such as Apache, this step could take advantage of parsing already performed within the web server to identify the Context, and perhaps even the Wrapper, to utilize in satisfying this Request.
  • Call the invoke() method of the selected Container, passing the initialized Request and Response instances as arguments.
  • Return any response created by the Container to the client, or return an appropriate error message if an exception of any type was thrown.
  • If utilizing a pool of Request and Response objects, recycle the pair of instances that was just used.
It is expected that the implementation details of various Connectors will vary widely, so the logic above should considered typical rather than normative.
author:
   Craig R. McClanahan
version:
   $Revision: 1.3 $ $Date: 2004/02/27 14:58:38 $




Method Summary
public  RequestcreateRequest()
     Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container.
public  ResponsecreateResponse()
     Create (or allocate) and return a Response object suitable for receiving the contents of a Response from the responsible Container.
public  ContainergetContainer()
     Return the Container used for processing requests received by this Connector.
public  booleangetEnableLookups()
     Return the "enable DNS lookups" flag.
public  ServerSocketFactorygetFactory()
     Return the server socket factory used by this Container.
public  StringgetInfo()
     Return descriptive information about this Connector implementation.
public  intgetRedirectPort()
     Return the port number to which a request should be redirected if it comes in on a non-SSL port and is subject to a security constraint with a transport guarantee that requires SSL.
public  StringgetScheme()
     Return the scheme that will be assigned to requests received through this connector.
public  booleangetSecure()
     Return the secure connection flag that will be assigned to requests received through this connector.
public  ServicegetService()
     Return the Service with which we are associated (if any).
public  voidinitialize()
     Invoke a pre-startup initialization.
public  voidpause()
     Pause the connector.
public  voidresume()
     Pause the connector.
public  voidsetContainer(Container container)
     Set the Container used for processing requests received by this Connector.
public  voidsetEnableLookups(boolean enableLookups)
     Set the "enable DNS lookups" flag.
public  voidsetFactory(ServerSocketFactory factory)
     Set the server socket factory used by this Container.
public  voidsetRedirectPort(int redirectPort)
     Set the redirect port number.
public  voidsetScheme(String scheme)
     Set the scheme that will be assigned to requests received through this connector.
public  voidsetSecure(boolean secure)
     Set the secure connection flag that will be assigned to requests received through this connector.
public  voidsetService(Service service)
     Set the Service with which we are associated (if any).



Method Detail
createRequest
public Request createRequest()(Code)
Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container.



createResponse
public Response createResponse()(Code)
Create (or allocate) and return a Response object suitable for receiving the contents of a Response from the responsible Container.



getContainer
public Container getContainer()(Code)
Return the Container used for processing requests received by this Connector.



getEnableLookups
public boolean getEnableLookups()(Code)
Return the "enable DNS lookups" flag.



getFactory
public ServerSocketFactory getFactory()(Code)
Return the server socket factory used by this Container.



getInfo
public String getInfo()(Code)
Return descriptive information about this Connector implementation.



getRedirectPort
public int getRedirectPort()(Code)
Return the port number to which a request should be redirected if it comes in on a non-SSL port and is subject to a security constraint with a transport guarantee that requires SSL.



getScheme
public String getScheme()(Code)
Return the scheme that will be assigned to requests received through this connector. Default value is "http".



getSecure
public boolean getSecure()(Code)
Return the secure connection flag that will be assigned to requests received through this connector. Default value is "false".



getService
public Service getService()(Code)
Return the Service with which we are associated (if any).



initialize
public void initialize() throws LifecycleException(Code)
Invoke a pre-startup initialization. This is used to allow connectors to bind to restricted ports under Unix operating environments.
exception:
  LifecycleException - If this server was already initialized.



pause
public void pause() throws LifecycleException(Code)
Pause the connector.



resume
public void resume() throws LifecycleException(Code)
Pause the connector.



setContainer
public void setContainer(Container container)(Code)
Set the Container used for processing requests received by this Connector.
Parameters:
  container - The new Container to use



setEnableLookups
public void setEnableLookups(boolean enableLookups)(Code)
Set the "enable DNS lookups" flag.
Parameters:
  enableLookups - The new "enable DNS lookups" flag value



setFactory
public void setFactory(ServerSocketFactory factory)(Code)
Set the server socket factory used by this Container.
Parameters:
  factory - The new server socket factory



setRedirectPort
public void setRedirectPort(int redirectPort)(Code)
Set the redirect port number.
Parameters:
  redirectPort - The redirect port number (non-SSL to SSL)



setScheme
public void setScheme(String scheme)(Code)
Set the scheme that will be assigned to requests received through this connector.
Parameters:
  scheme - The new scheme



setSecure
public void setSecure(boolean secure)(Code)
Set the secure connection flag that will be assigned to requests received through this connector.
Parameters:
  secure - The new secure connection flag



setService
public void setService(Service service)(Code)
Set the Service with which we are associated (if any).
Parameters:
  service - The service that owns this Engine



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