Class EmbeddedWebContainer

  • All Implemented Interfaces:
    Lifecycle, Service, org.glassfish.hk2.api.PostConstruct

    @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 Detail

      • logger

        public static final Logger logger
    • Constructor Detail

      • EmbeddedWebContainer

        public EmbeddedWebContainer()
    • Method Detail

      • postConstruct

        public void postConstruct()
        Specified by:
        postConstruct in interface org.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 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​(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 module
        location - Absolute pathname to the web module directory
        defaultWebXmlLocation - 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.xml
        useDOLforDeployment -
        wmInfo -
      • 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​(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 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