Class StandardService

    • Field Detail

      • connectors

        protected Connector[] connectors
        The set of Connectors associated with this Service.
      • executors

        protected final ArrayList<Executor> executors
        The list of executors held by the service.
      • mapper

        protected final Mapper mapper
        Mapper.
      • mapperListener

        protected final MapperListener mapperListener
        Mapper listener.
    • Constructor Detail

      • StandardService

        public StandardService()
    • Method Detail

      • getGracefulStopAwaitMillis

        public long getGracefulStopAwaitMillis()
      • setGracefulStopAwaitMillis

        public void setGracefulStopAwaitMillis​(long gracefulStopAwaitMillis)
      • getMapper

        public Mapper getMapper()
        Specified by:
        getMapper in interface Service
        Returns:
        the mapper associated with this Service.
      • getContainer

        public Engine getContainer()
        Specified by:
        getContainer in interface Service
        Returns:
        the Engine that handles requests for all Connectors associated with this Service.
      • setContainer

        public void setContainer​(Engine engine)
        Description copied from interface: Service
        Set the Engine that handles requests for all Connectors associated with this Service.
        Specified by:
        setContainer in interface Service
        Parameters:
        engine - The new Engine
      • getName

        public String getName()
        Return the name of this Service.
        Specified by:
        getName in interface Service
        Returns:
        the name of this Service.
      • setName

        public void setName​(String name)
        Set the name of this Service.
        Specified by:
        setName in interface Service
        Parameters:
        name - The new service name
      • getServer

        public Server getServer()
        Return the Server with which we are associated (if any).
        Specified by:
        getServer in interface Service
        Returns:
        the Server with which we are associated (if any).
      • setServer

        public void setServer​(Server server)
        Set the Server with which we are associated (if any).
        Specified by:
        setServer in interface Service
        Parameters:
        server - The server that owns this Service
      • addConnector

        public void addConnector​(Connector connector)
        Add a new Connector to the set of defined Connectors, and associate it with this Service's Container.
        Specified by:
        addConnector in interface Service
        Parameters:
        connector - The Connector to be added
      • getConnectorNames

        public ObjectName[] getConnectorNames()
      • addPropertyChangeListener

        public void addPropertyChangeListener​(PropertyChangeListener listener)
        Add a property change listener to this component.
        Parameters:
        listener - The listener to add
      • findConnectors

        public Connector[] findConnectors()
        Find and return the set of Connectors associated with this Service.
        Specified by:
        findConnectors in interface Service
        Returns:
        the set of associated Connectors
      • removeConnector

        public void removeConnector​(Connector connector)
        Remove the specified Connector from the set associated from this Service. The removed Connector will also be disassociated from our Container.
        Specified by:
        removeConnector in interface Service
        Parameters:
        connector - The Connector to be removed
      • removePropertyChangeListener

        public void removePropertyChangeListener​(PropertyChangeListener listener)
        Remove a property change listener from this component.
        Parameters:
        listener - The listener to remove
      • toString

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

        public void addExecutor​(Executor ex)
        Adds a named executor to the service
        Specified by:
        addExecutor in interface Service
        Parameters:
        ex - Executor
      • findExecutors

        public Executor[] findExecutors()
        Retrieves all executors
        Specified by:
        findExecutors in interface Service
        Returns:
        Executor[]
      • getExecutor

        public Executor getExecutor​(String executorName)
        Retrieves executor by name, null if not found
        Specified by:
        getExecutor in interface Service
        Parameters:
        executorName - String
        Returns:
        Executor
      • removeExecutor

        public void removeExecutor​(Executor ex)
        Removes an executor from the service
        Specified by:
        removeExecutor in interface Service
        Parameters:
        ex - Executor
      • setParentClassLoader

        public void setParentClassLoader​(ClassLoader parent)
        Set the parent class loader for this server.
        Specified by:
        setParentClassLoader in interface Service
        Parameters:
        parent - The new parent class loader
      • getDomainInternal

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