com.sun.enterprise.web
Class EmbeddedWebContainer

java.lang.Object
  extended by org.apache.catalina.core.StandardService
      extended by org.apache.catalina.startup.Embedded
          extended by com.sun.enterprise.web.EmbeddedWebContainer
All Implemented Interfaces:
javax.management.MBeanRegistration, Lifecycle, Service, org.jvnet.hk2.component.PostConstruct

@Service(name="com.sun.enterprise.web.EmbeddedWebContainer")
@Scoped(value=org.jvnet.hk2.component.Singleton.class)
public final class EmbeddedWebContainer
extends Embedded
implements org.jvnet.hk2.component.PostConstruct

Represents an embedded Catalina web container within the Application Server.


Field Summary
protected static java.util.logging.Logger _logger
           
protected static java.util.ResourceBundle rb
           
 
Fields inherited from class org.apache.catalina.startup.Embedded
authenticators, await, embeddedDirectoryListing, engines, info, lifecycle, logger, realm, sm, socketFactory, started, useNaming
 
Fields inherited from class org.apache.catalina.core.StandardService
connectors, container, controller, debug, domain, initialized, mserver, oname, suffix, support, type
 
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT
 
Constructor Summary
EmbeddedWebContainer()
           
 
Method Summary
 Connector createConnector(java.lang.String address, int port, java.lang.String protocol)
          Create a customized version of the Tomcat's 5 Coyote Connector.
 Context createContext(java.lang.String id, java.lang.String ctxPath, java.io.File location, java.lang.String defaultContextXmlLocation, java.lang.String defaultWebXmlLocation, boolean useDOLforDeployment, WebModuleConfig wmInfo)
          Create a web module/application.
 Engine createEngine()
          Create, configure, and return an Engine that will process all HTTP requests received from one of the associated Connectors, based on the specified properties.
 Host createHost(java.lang.String vsID, VirtualServer vsBean, java.lang.String vsDocroot, java.lang.String vsLogFile, MimeMap vsMimeMap)
          Creates a virtual server.
 Connector[] getConnectors()
          Returns the list of Connector objects associated with this EmbeddedWebContainer.
 Engine[] getEngines()
          Return the list of engines created (from Embedded API)
 void postConstruct()
           
 
Methods inherited from class org.apache.catalina.startup.Embedded
addAuthenticator, addConnector, addEngine, addLifecycleListener, createConnector, createConnector, createConnector, createContext, createHost, createLoader, findLifecycleListeners, getCatalinaBase, getCatalinaHome, getInfo, getLogger, getRealm, getSocketFactory, initDirs, initNaming, isAwait, isDirectoryListing, isUseNaming, removeContext, removeEngine, removeHost, removeLifecycleListener, setAwait, setCatalinaBase, setCatalinaHome, setDirectoryListing, setLogger, setRealm, setSecurityProtection, setSocketFactory, setUseNaming, start, stop
 
Methods inherited from class org.apache.catalina.core.StandardService
addPropertyChangeListener, destroy, findConnector, findConnectors, getConnectorNames, getContainer, getContainerName, getDebug, getDomain, getName, getObjectName, getServer, init, initialize, postDeregister, postRegister, preDeregister, preRegister, removeConnector, removePropertyChangeListener, setContainer, setDebug, setName, setServer, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_logger

protected static final java.util.logging.Logger _logger

rb

protected static final java.util.ResourceBundle rb
Constructor Detail

EmbeddedWebContainer

public EmbeddedWebContainer()
Method Detail

postConstruct

public void postConstruct()
Specified by:
postConstruct in interface org.jvnet.hk2.component.PostConstruct

createHost

public Host createHost(java.lang.String vsID,
                       VirtualServer vsBean,
                       java.lang.String vsDocroot,
                       java.lang.String vsLogFile,
                       MimeMap vsMimeMap)
Creates a virtual server.

Parameters:
vsID - Virtual server id
vsBean - Bean corresponding to virtual-server element in domain.xml
vsDocroot - Virtual server docroot
vsMimeMap - Virtual server MIME mappings
Returns:
The generated virtual server instance

createContext

public Context createContext(java.lang.String id,
                             java.lang.String ctxPath,
                             java.io.File location,
                             java.lang.String defaultContextXmlLocation,
                             java.lang.String defaultWebXmlLocation,
                             boolean useDOLforDeployment,
                             WebModuleConfig wmInfo)
Create a web module/application.

Parameters:
ctxPath - Context path for the web module
location - Absolute pathname to the web module directory
defaultWebXmlLocation - Location of default-web.xml

getEngines

public Engine[] getEngines()
Return the list of engines created (from Embedded API)

Overrides:
getEngines in class Embedded

getConnectors

public Connector[] getConnectors()
Returns the list of Connector objects associated with this EmbeddedWebContainer.

Returns:
The list of Connector objects associated with this EmbeddedWebContainer

createConnector

public Connector createConnector(java.lang.String address,
                                 int port,
                                 java.lang.String protocol)
Create a customized version of the Tomcat's 5 Coyote Connector. This connector is required in order to support PE Web Programmatic login functionality.

Overrides:
createConnector in class Embedded
Parameters:
address - InetAddress to bind to, or null if the connector is supposed to bind to all addresses on this server
port - Port number to listen to
protocol - the http protocol to use.

createEngine

public Engine createEngine()
Create, configure, and return an Engine that will process all HTTP requests received from one of the associated Connectors, based on the specified properties. Do not create the JAAS default realm since all children will have their own.

Overrides:
createEngine in class Embedded


Copyright © 2012 GlassFish Community. All Rights Reserved.