Top Description Fields Methods
org.apache.catalina

public Interface Service

extends Lifecycle
Known Direct Implementers
org.apache.catalina.core.StandardService
Imports
org.apache.catalina.connector.Connector, org.apache.catalina.mapper.Mapper

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

Field Summary

Inherited from org.apache.catalina.Lifecycle:
AFTER_DESTROY_EVENTAFTER_INIT_EVENTAFTER_START_EVENTAFTER_STOP_EVENTBEFORE_DESTROY_EVENTBEFORE_INIT_EVENTBEFORE_START_EVENTBEFORE_STOP_EVENTCONFIGURE_START_EVENTCONFIGURE_STOP_EVENTPERIODIC_EVENTSTART_EVENTSTOP_EVENT

Method Summary

Modifier and TypeMethod and Description
public void
addConnector(Connector
The Connector to be added
connector
)

Add a new Connector to the set of defined Connectors, and associate it with this Service's Container.

public void
addExecutor(Executor
Executor
ex
)

Adds a named executor to the service

public Connector[]

Returns:

the set of associated Connectors
findConnectors
()

Find and return the set of Connectors associated with this Service.

public Executor[]

Returns:

Executor[]
findExecutors
()

Retrieves all executors

public Engine

Returns:

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

public String

Returns:

the domain under which this container will be / has been registered.
getDomain
()

public Executor

Returns:

Executor
getExecutor
(String
String
name
)

Retrieves executor by name, null if not found

public Mapper

Returns:

the mapper associated with this Service.
getMapper
()

public String

Returns:

the name of this Service.
getName
()

public ClassLoader

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.
getParentClassLoader
()

public Server

Returns:

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

public void
removeConnector(Connector
The Connector to be removed
connector
)

Remove the specified Connector from the set associated from this Service.

public void
removeExecutor(Executor
Executor
ex
)

Removes an executor from the service

public void
setContainer(Engine
The new Engine
engine
)

Set the Engine that handles requests for all Connectors associated with this Service.

public void
setName(String
The new service name
name
)

Set the name of this Service.

public void
setParentClassLoader(ClassLoader
The new parent class loader
parent
)

Set the parent class loader for this service.

public void
setServer(Server
The server that owns this Service
server
)

Set the Server with which we are associated (if any).

Inherited from org.apache.catalina.Lifecycle:
addLifecycleListenerdestroyfindLifecycleListenersgetStategetStateNameinitremoveLifecycleListenerstartstop

Method Detail

addConnectorback to summary
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:Connector

The Connector to be added

addExecutorback to summary
public void addExecutor(Executor ex)

Adds a named executor to the service

Parameters
ex:Executor

Executor

findConnectorsback to summary
public Connector[] findConnectors()

Find and return the set of Connectors associated with this Service.

Returns:Connector[]

the set of associated Connectors

findExecutorsback to summary
public Executor[] findExecutors()

Retrieves all executors

Returns:Executor[]

Executor[]

getContainerback to summary
public Engine getContainer()
Returns:Engine

the Engine that handles requests for all Connectors associated with this Service.

getDomainback to summary
public String getDomain()
Returns:String

the domain under which this container will be / has been registered.

getExecutorback to summary
public Executor getExecutor(String name)

Retrieves executor by name, null if not found

Parameters
name:String

String

Returns:Executor

Executor

getMapperback to summary
public Mapper getMapper()
Returns:Mapper

the mapper associated with this Service.

getNameback to summary
public String getName()
Returns:String

the name of this Service.

getParentClassLoaderback to summary
public ClassLoader getParentClassLoader()
Returns:ClassLoader

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.

getServerback to summary
public Server getServer()
Returns:Server

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

removeConnectorback to summary
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:Connector

The Connector to be removed

removeExecutorback to summary
public void removeExecutor(Executor ex)

Removes an executor from the service

Parameters
ex:Executor

Executor

setContainerback to summary
public void setContainer(Engine engine)

Set the Engine that handles requests for all Connectors associated with this Service.

Parameters
engine:Engine

The new Engine

setNameback to summary
public void setName(String name)

Set the name of this Service.

Parameters
name:String

The new service name

setParentClassLoaderback to summary
public void setParentClassLoader(ClassLoader parent)

Set the parent class loader for this service.

Parameters
parent:ClassLoader

The new parent class loader

setServerback to summary
public void setServer(Server server)

Set the Server with which we are associated (if any).

Parameters
server:Server

The server that owns this Service