Interface Service
- All Superinterfaces:
Lifecycle
- All Known Implementing Classes:
StandardService
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Lifecycle
Lifecycle.SingleUse -
Field Summary
Fields inherited from interface Lifecycle
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConnector(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 serviceFind and return the set of Connectors associated with this Service.Executor[]Retrieves all executorsReturns theEnginethat handles requests for allConnectorsassociated with this Service.Returns the domain under which this container will be / has been registered.getExecutor(String name) Retrieves executor by name, null if not foundReturns the mapper associated with this Service.getName()Returns the name of this Service.Returns the parent class loader for this component.Returns theServerwith which we are associated (if any).voidremoveConnector(Connector connector) Remove the specified Connector from the set associated from this Service.voidRemoves an executor from the servicevoidsetContainer(Engine engine) Set theEnginethat handles requests for allConnectorsassociated with this Service.voidSet the name of this Service.voidsetParentClassLoader(ClassLoader parent) Set the parent class loader for this service.voidSet theServerwith which we are associated (if any).Methods inherited from interface Lifecycle
addLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop
-
Method Details
-
getContainer
Engine getContainer()Returns theEnginethat handles requests for allConnectorsassociated with this Service.- Returns:
- the Engine
-
setContainer
Set theEnginethat handles requests for allConnectorsassociated with this Service.- Parameters:
engine- The new Engine
-
getName
-
setName
-
getServer
Server getServer()Returns theServerwith which we are associated (if any).- Returns:
- the associated Server
-
setServer
Set theServerwith 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, returngetServer()Server.getParentClassLoader(). If no server has been set, return the system class loader.- Returns:
- the parent class loader
-
setParentClassLoader
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.- Returns:
- the domain name
-
addConnector
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 array of associated Connectors
-
removeConnector
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
-
findExecutors
-
getExecutor
-
removeExecutor
-
getMapper
-