Interface Service

All Superinterfaces:
Lifecycle
All Known Implementing Classes:
StandardService

public interface Service extends Lifecycle
A Service is a group of one or more Connectors that share a single Container to process their incoming requests. This arrangement allows, for example, a non-SSL and SSL connector to share the same population of web apps.

A given JVM can contain any number of Service instances; however, they are completely independent of each other and share only the basic JVM facilities and classes on the system class path.

Author:
Craig R. McClanahan
  • Method Details

    • getContainer

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

      void setContainer(Engine engine)
      Set the Engine that handles requests for all Connectors associated with this Service.
      Parameters:
      engine - The new Engine
    • getName

      String getName()
      Returns:
      the name of this Service.
    • setName

      void setName(String name)
      Set the name of this Service.
      Parameters:
      name - The new service name
    • getServer

      Server getServer()
      Returns:
      the Server with which we are associated (if any).
    • setServer

      void setServer(Server server)
      Set the Server with which we are associated (if any).
      Parameters:
      server - The server that owns this Service
    • getParentClassLoader

      ClassLoader getParentClassLoader()
      Returns:
      the parent class loader for this component. If not set, return getServer() Server.getParentClassLoader(). If no server has been set, return the system class loader.
    • setParentClassLoader

      void setParentClassLoader(ClassLoader parent)
      Set the parent class loader for this service.
      Parameters:
      parent - The new parent class loader
    • getDomain

      String getDomain()
      Returns:
      the domain under which this container will be / has been registered.
    • addConnector

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

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

      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.
      Parameters:
      connector - The Connector to be removed
    • addExecutor

      void addExecutor(Executor ex)
      Adds a named executor to the service
      Parameters:
      ex - Executor
    • findExecutors

      Executor[] findExecutors()
      Retrieves all executors
      Returns:
      Executor[]
    • getExecutor

      Executor getExecutor(String name)
      Retrieves executor by name, null if not found
      Parameters:
      name - String
      Returns:
      Executor
    • removeExecutor

      void removeExecutor(Executor ex)
      Removes an executor from the service
      Parameters:
      ex - Executor
    • getMapper

      Mapper getMapper()
      Returns:
      the mapper associated with this Service.