Package com.sun.enterprise.web
Class EmbeddedWebContainer
- java.lang.Object
-
- org.apache.catalina.core.StandardService
-
- org.apache.catalina.startup.Embedded
-
- com.sun.enterprise.web.EmbeddedWebContainer
-
@Service(name="com.sun.enterprise.web.EmbeddedWebContainer") @Singleton public final class EmbeddedWebContainer extends Embedded implements org.glassfish.hk2.api.PostConstruct
Represents an embedded Catalina web container within the Application Server.
-
-
Field Summary
Fields Modifier and Type Field Description static Logger
logger
-
Fields inherited from class org.apache.catalina.startup.Embedded
authenticators, await, embeddedDirectoryListing, engines, info, lifecycle, log, rb, realm, socketFactory, started, useNaming
-
Fields inherited from class org.apache.catalina.core.StandardService
connectors, connectorsMonitor, container, debug, domain, initialized, oname, support
-
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
Constructors Constructor Description EmbeddedWebContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Connector
createConnector(String address, int port, String protocol)
Create a customized version of the Tomcat's 5 Coyote Connector.Context
createContext(String id, String ctxPath, File location, String defaultContextXmlLocation, 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(String vsID, VirtualServer vsBean, String vsDocroot, 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()
void
updateContext(WebModule context, String defaultContextXmlLocation, String defaultWebXmlLocation, boolean useDOLforDeployment, WebModuleConfig wmInfo)
Update a web module/application.-
Methods inherited from class org.apache.catalina.startup.Embedded
addAuthenticator, addConnector, addEngine, addLifecycleListener, createConnector, createConnector, createConnector, createContext, createHost, createLoader, destroy, 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, findConnector, findConnectors, getBroadcaster, getConnectorNames, getContainer, getContainerName, getDebug, getDomain, getName, getObjectName, getServer, init, initialize, removeConnector, removePropertyChangeListener, setBroadcaster, setContainer, setDebug, setName, setServer, toString
-
-
-
-
Field Detail
-
logger
public static final Logger logger
-
-
Method Detail
-
postConstruct
public void postConstruct()
- Specified by:
postConstruct
in interfaceorg.glassfish.hk2.api.PostConstruct
-
createHost
public Host createHost(String vsID, VirtualServer vsBean, String vsDocroot, String vsLogFile, MimeMap vsMimeMap)
Creates a virtual server.- Parameters:
vsID
- Virtual server idvsBean
- Bean corresponding to virtual-server element in domain.xmlvsDocroot
- Virtual server docrootvsMimeMap
- Virtual server MIME mappings- Returns:
- The generated virtual server instance
-
createContext
public Context createContext(String id, String ctxPath, File location, String defaultContextXmlLocation, String defaultWebXmlLocation, boolean useDOLforDeployment, WebModuleConfig wmInfo)
Create a web module/application.- Parameters:
ctxPath
- Context path for the web modulelocation
- Absolute pathname to the web module directorydefaultWebXmlLocation
- Location of default-web.xml
-
updateContext
public void updateContext(WebModule context, String defaultContextXmlLocation, String defaultWebXmlLocation, boolean useDOLforDeployment, WebModuleConfig wmInfo)
Update a web module/application.- Parameters:
context
-defaultContextXmlLocation
-defaultWebXmlLocation
- Location of default-web.xmluseDOLforDeployment
-wmInfo
-
-
getEngines
public Engine[] getEngines()
Return the list of engines created (from Embedded API)- Overrides:
getEngines
in classEmbedded
-
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(String address, int port, 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 classEmbedded
- Parameters:
address
- InetAddress to bind to, ornull
if the connector is supposed to bind to all addresses on this serverport
- Port number to listen toprotocol
- 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 classEmbedded
-
-