Class StandardEngine

  • All Implemented Interfaces:, Container, Engine, JmxEnabled, Lifecycle

    public class StandardEngine
    extends ContainerBase
    implements Engine
    Standard implementation of the Engine interface. Each child container must be a Host implementation to process the specific fully qualified host name of that virtual host.
    You can set the jvmRoute direct or with the jvmRoute.
    Craig R. McClanahan
    • Constructor Detail

      • StandardEngine

        public StandardEngine()
        Create a new StandardEngine component with the default basic Valve.
    • Method Detail

      • getRealm

        public Realm getRealm()
        Obtain the configured Realm and provide a default Realm implementation when no explicit configuration is set.
        Specified by:
        getRealm in interface Container
        getRealm in class ContainerBase
        configured realm, or a NullRealm by default
      • getDefaultHost

        public java.lang.String getDefaultHost()
        Return the default host.
        Specified by:
        getDefaultHost in interface Engine
        the default host name for this Engine.
      • setDefaultHost

        public void setDefaultHost​(java.lang.String host)
        Set the default host.
        Specified by:
        setDefaultHost in interface Engine
        host - The new default host
      • setJvmRoute

        public void setJvmRoute​(java.lang.String routeId)
        Set the cluster-wide unique identifier for this Engine. This value is only useful in a load-balancing scenario.

        This property should not be changed once it is set.

        Specified by:
        setJvmRoute in interface Engine
        routeId - the (new) JVM Route ID. Each Engine within a cluster must have a unique JVM Route ID.
      • getJvmRoute

        public java.lang.String getJvmRoute()
        Retrieve the cluster-wide unique identifier for this Engine. This value is only useful in a load-balancing scenario.
        Specified by:
        getJvmRoute in interface Engine
        the JvmRouteId for this engine.
      • getService

        public Service getService()
        Return the Service with which we are associated (if any).
        Specified by:
        getService in interface Engine
        the Service with which we are associated (if any).
      • setService

        public void setService​(Service service)
        Set the Service with which we are associated (if any).
        Specified by:
        setService in interface Engine
        service - The service that owns this Engine
      • addChild

        public void addChild​(Container child)
        Add a child Container, only if the proposed child is an implementation of Host.
        Specified by:
        addChild in interface Container
        addChild in class ContainerBase
        child - Child container to be added
      • setParent

        public void setParent​(Container container)
        Disallow any attempt to set a parent for this Container, since an Engine is supposed to be at the top of the Container hierarchy.
        Specified by:
        setParent in interface Container
        setParent in class ContainerBase
        container - Proposed parent Container
      • logAccess

        public void logAccess​(Request request,
                              Response response,
                              long time,
                              boolean useDefault)
        Override the default implementation. If no access log is defined for the Engine, look for one in the Engine's default host and then the default host's ROOT context. If still none is found, return the default NoOp access log.
        Specified by:
        logAccess in interface Container
        logAccess in class ContainerBase
        request - Request (associated with the response) to log
        response - Response (associated with the request) to log
        time - Time taken to process the request/response in milliseconds (use 0 if not known)
        useDefault - Flag that indicates that the request/response should be logged in the engine's default access log
      • getObjectNameKeyProperties

        protected java.lang.String getObjectNameKeyProperties()
        Description copied from class: LifecycleMBeanBase
        Allow sub-classes to specify the key properties component of the ObjectName that will be used to register this component.
        Specified by:
        getObjectNameKeyProperties in class LifecycleMBeanBase
        The string representation of the key properties component of the desired ObjectName
      • getDomainInternal

        protected java.lang.String getDomainInternal()
        Description copied from class: LifecycleMBeanBase
        Method implemented by sub-classes to identify the domain in which MBeans should be registered.
        getDomainInternal in class ContainerBase
        The name of the domain to use to register MBeans.