org.apache.catalina

Interface Service

public interface Service

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.

Version: $Revision: 520968 $ $Date: 2007-03-21 19:00:39 +0100 (Wed, 21 Mar 2007) $

Author: Craig R. McClanahan

Method Summary
voidaddConnector(Connector connector)
Add a new Connector to the set of defined Connectors, and associate it with this Service's Container.
voidaddExecutor(Executor ex)
Adds a named executor to the service
Connector[]findConnectors()
Find and return the set of Connectors associated with this Service.
Executor[]findExecutors()
Retrieves all executors
ContainergetContainer()
Return the Container that handles requests for all Connectors associated with this Service.
ExecutorgetExecutor(String name)
Retrieves executor by name, null if not found
StringgetInfo()
Return descriptive information about this Service implementation and the corresponding version number, in the format <description>/<version>.
StringgetName()
Return the name of this Service.
ServergetServer()
Return the Server with which we are associated (if any).
voidinitialize()
Invoke a pre-startup initialization.
voidremoveConnector(Connector connector)
Remove the specified Connector from the set associated from this Service.
voidremoveExecutor(Executor ex)
Removes an executor from the service
voidsetContainer(Container container)
Set the Container that handles requests for all Connectors associated with this Service.
voidsetName(String name)
Set the name of this Service.
voidsetServer(Server server)
Set the Server with which we are associated (if any).

Method Detail

addConnector

public 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

addExecutor

public void addExecutor(Executor ex)
Adds a named executor to the service

Parameters: ex Executor

findConnectors

public Connector[] findConnectors()
Find and return the set of Connectors associated with this Service.

findExecutors

public Executor[] findExecutors()
Retrieves all executors

Returns: Executor[]

getContainer

public Container getContainer()
Return the Container that handles requests for all Connectors associated with this Service.

getExecutor

public Executor getExecutor(String name)
Retrieves executor by name, null if not found

Parameters: name String

Returns: Executor

getInfo

public String getInfo()
Return descriptive information about this Service implementation and the corresponding version number, in the format <description>/<version>.

getName

public String getName()
Return the name of this Service.

getServer

public Server getServer()
Return the Server with which we are associated (if any).

initialize

public void initialize()
Invoke a pre-startup initialization. This is used to allow connectors to bind to restricted ports under Unix operating environments.

Throws: LifecycleException If this server was already initialized.

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.

Parameters: connector The Connector to be removed

removeExecutor

public void removeExecutor(Executor ex)
Removes an executor from the service

Parameters: ex Executor

setContainer

public void setContainer(Container container)
Set the Container that handles requests for all Connectors associated with this Service.

Parameters: container The new Container

setName

public void setName(String name)
Set the name of this Service.

Parameters: name The new service name

setServer

public void setServer(Server server)
Set the Server with which we are associated (if any).

Parameters: server The server that owns this Service

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.