Apache Tomcat 7.0.4

org.apache.catalina
Interface Service

All Superinterfaces:
Lifecycle
All Known Implementing Classes:
Embedded, 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.

Version:
$Id: Service.java 996231 2010-09-12 01:25:03Z markt $
Author:
Craig R. McClanahan

Field Summary
 
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, DESTROY_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
 
Method Summary
 void addConnector(Connector connector)
          Add a new Connector to the set of defined Connectors, and associate it with this Service's Container.
 void addExecutor(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
 Container getContainer()
          Return the Container that handles requests for all Connectors associated with this Service.
 Executor getExecutor(String name)
          Retrieves executor by name, null if not found
 String getInfo()
          Return descriptive information about this Service implementation and the corresponding version number, in the format <description>/<version>.
 String getName()
          Return the name of this Service.
 ClassLoader getParentClassLoader()
          Return the parent class loader.
 Server getServer()
          Return the Server with which we are associated (if any).
 void removeConnector(Connector connector)
          Remove the specified Connector from the set associated from this Service.
 void removeExecutor(Executor ex)
          Removes an executor from the service
 void setContainer(Container container)
          Set the Container that handles requests for all Connectors associated with this Service.
 void setName(String name)
          Set the name of this Service.
 void setServer(Server server)
          Set the Server with which we are associated (if any).
 
Methods inherited from interface org.apache.catalina.Lifecycle
addLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop
 

Method Detail

getContainer

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


setContainer

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

Parameters:
container - The new Container

getInfo

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


getName

String getName()
Return 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()
Return 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()
Return the parent class loader.


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.


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

Apache Tomcat 7.0.4

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