Class StandardEngine

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

    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.
    Version:
    $Revision: 1.5 $ $Date: 2006/03/12 01:27:01 $
    Author:
    Craig R. McClanahan
    • Constructor Detail

      • StandardEngine

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

      • getRealm

        public Realm getRealm()
        Provide a default in case no explicit configuration is set
        Specified by:
        getRealm in interface Container
        Overrides:
        getRealm in class ContainerBase
        Returns:
        configured realm, or a JAAS realm by default
      • setDefaultHost

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

        public void setName​(String name)
        Description copied from class: ContainerBase
        Set a name string (suitable for use by humans) that describes this Container. Within the set of child containers belonging to a particular parent, Container names must be unique.
        Specified by:
        setName in interface Container
        Overrides:
        setName in class ContainerBase
        Parameters:
        name - New name of this container
      • setJvmRoute

        public void setJvmRoute​(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
        Parameters:
        routeId - the (new) JVM Route ID. Each Engine within a cluster must have a unique JVM Route ID.
      • getJvmRoute

        public 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
      • getService

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

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

        public String getBaseDir()
      • setBaseDir

        public void setBaseDir​(String baseDir)
      • 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
        Overrides:
        addChild in class ContainerBase
        Parameters:
        child - Child container to be added
      • getInfo

        public String getInfo()
        Return descriptive information about this Container implementation and the corresponding version number, in the format <description>/<version>.
        Specified by:
        getInfo in interface Container
        Overrides:
        getInfo in class ContainerBase
      • 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
        Overrides:
        setParent in class ContainerBase
        Parameters:
        container - Proposed parent Container
      • init

        public void init()
        Description copied from class: ContainerBase
        Init method, part of the MBean lifecycle. If the container was added via JMX, it'll register itself with the parent, using the ObjectName conventions to locate the parent. If the container was added directly and it doesn't have an ObjectName, it'll create a name and register itself with the JMX console. On destroy(), the object will unregister.
        Overrides:
        init in class ContainerBase
      • toString

        public String toString()
        Return a String representation of this component.
        Overrides:
        toString in class Object