Java Doc for EmbeddedTomcat.java in  » Science » Cougaar12_4 » org » cougaar » lib » web » tomcat » 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 » Science » Cougaar12_4 » org.cougaar.lib.web.tomcat 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.cougaar.lib.web.tomcat.EmbeddedTomcat

EmbeddedTomcat
public class EmbeddedTomcat extends Catalina (Code)
This class wraps the org.apache.catalina.startup.Catalina class to follow similar behavior as Tomcat 3.3's EmbededTomcat class. The most important functionality that it handles is reading the server.xml file and then allowing the caller access to the objects. In specific, the Connectors needed to be configurable dynamically. This class inherits from Catalina only to get access to the server objects.



Constructor Summary
public  EmbeddedTomcat()
    

Method Summary
public  voidaddEndpoint(int port, Map options)
     Adds an HTTPConnector to the server.
public  voidaddEndpoint(int port, InetAddress address, ServerSocketFactory fact, int acceptCount)
     Adds an HTTP socket connector to the server.
public  voidaddSecureEndpoint(int port, Map options)
     Adds an HTTPS socket connector to the server.
public  voidaddSecureEndpoint(int port, InetAddress address, ServerSocketFactory fact)
     Adds an HTTPS socket connector to the server.
public  voidconfigure(Map options)
     Configure the server.
public  voidembeddedStart()
     Starts the web server.
public  voidembeddedStop()
     Stops the web server.
public  EnginegetEngine()
     Returns the Engine object.
public  ServergetServer()
     Returns a reference to the Server object.
public  ServicegetService()
     Returns a reference to the Service.
public  voidreadConfigFile(String configFile)
     Reads the xml configuration file given.
public  voidsetInstall(String installPath)
    
protected  voidsetRedirectPort(HttpConnector conn)
     Sets the redirection port all HTTP connections if this is an HTTPS connection or the redirection port of this connection if an HTTPS connection exists and this is an HTTP connection.


Constructor Detail
EmbeddedTomcat
public EmbeddedTomcat()(Code)
Default constructor




Method Detail
addEndpoint
public void addEndpoint(int port, Map options)(Code)
Adds an HTTPConnector to the server.

Current valid options:

  • "factory"
    Optional classname for server socket factory, which defaults to "org.apache.catalina.net.DefaultServerSocketFactory"

Parameters:
  port - The TCP port number to bind to
Parameters:
  options - Map of optional parameters



addEndpoint
public void addEndpoint(int port, InetAddress address, ServerSocketFactory fact, int acceptCount)(Code)
Adds an HTTP socket connector to the server.



addSecureEndpoint
public void addSecureEndpoint(int port, Map options)(Code)
Adds an HTTPS socket connector to the server.

Note, if the factory is not specified, then Tomcat imposes these restrictions:

  • The certificate name must be "tomcat".
  • The keystore and the truststore must be the same file.

Current valid options:

  • "factory"
    Optional classname for server socket factory, which defaults to "org.apache.catalina.net.SSLServerSocketFactory"
  • "keystore"
    Optional file name for the certificate keystore.
  • "keypass"
    Optional password for the certificate keystore.
  • "clientAuth"
    If the value is "true", then client authentication is enabled.

Parameters:
  port - The TCP port number to bind to
Parameters:
  options - Map of optional parameters



addSecureEndpoint
public void addSecureEndpoint(int port, InetAddress address, ServerSocketFactory fact)(Code)
Adds an HTTPS socket connector to the server.



configure
public void configure(Map options)(Code)
Configure the server.

Current valid options:

  • "debug"
    Optional debug flag, which defaults to "false".

Parameters:
  options - Map of optional parameters



embeddedStart
public void embeddedStart() throws LifecycleException(Code)
Starts the web server.



embeddedStop
public void embeddedStop() throws LifecycleException(Code)
Stops the web server.



getEngine
public Engine getEngine()(Code)
Returns the Engine object. There may only be one Engine.
throws:
  IllegalStateException - If the configuration file hasn't been read.
See Also:   EmbeddedTomcat.readConfigFile



getServer
public Server getServer()(Code)
Returns a reference to the Server object.
throws:
  IllegalStateException - If the configuration file hasn't been read.
See Also:   EmbeddedTomcat.readConfigFile



getService
public Service getService()(Code)
Returns a reference to the Service. There may only be one service in the configuration file.
throws:
  IllegalStateException - If the configuration file hasn't been read.
See Also:   EmbeddedTomcat.readConfigFile



readConfigFile
public void readConfigFile(String configFile) throws Exception(Code)
Reads the xml configuration file given. This must be called before the server is started via embeddedStart.



setInstall
public void setInstall(String installPath)(Code)
Sets the catalina.home and catalina.base paths to the given String



setRedirectPort
protected void setRedirectPort(HttpConnector conn)(Code)
Sets the redirection port all HTTP connections if this is an HTTPS connection or the redirection port of this connection if an HTTPS connection exists and this is an HTTP connection.
Parameters:
  conn - The HTTP to set the redirection port or the HTTPSconnection to set all other connections' redirection ports.



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