public interface Service
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.
Modifier and Type | Method and Description |
---|---|
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. |
java.lang.String |
getEntropy()
Return the entropy increaser value, or compute a semi-useful value
if this String has not yet been set.
|
Executor |
getExecutor(java.lang.String name)
Retrieves executor by name, null if not found
|
java.lang.String |
getInfo()
Return descriptive information about this Service implementation and
the corresponding version number, in the format
<description>/<version> . |
Mapper |
getMapper()
Return the
Mapper that handles mapping for all
Connectors associated with this Service. |
java.lang.String |
getName()
Return the name of this Service.
|
java.security.SecureRandom |
getRandom()
Get the global secure random that will be used for this service.
|
Server |
getServer()
Return the
Server with which we are associated (if any). |
void |
initialize()
Invoke a pre-startup initialization.
|
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 |
setEntropy(java.lang.String entropy)
Set the entropy increaser value.
|
void |
setName(java.lang.String name)
Set the name of this Service.
|
void |
setServer(Server server)
Set the
Server with which we are associated (if any). |
Container getContainer()
Container
that handles requests for all
Connectors
associated with this Service.void setContainer(Container container)
Container
that handles requests for all
Connectors
associated with this Service.container
- The new Containerjava.lang.String getInfo()
<description>/<version>
.Mapper getMapper()
Mapper
that handles mapping for all
Connectors
associated with this Service.java.lang.String getName()
void setName(java.lang.String name)
name
- The new service namejava.lang.String getEntropy()
void setEntropy(java.lang.String entropy)
entropy
- The new entropy increaser valueServer getServer()
Server
with which we are associated (if any).void setServer(Server server)
Server
with which we are associated (if any).server
- The server that owns this Servicevoid addConnector(Connector connector)
connector
- The Connector to be addedConnector[] findConnectors()
void removeConnector(Connector connector)
connector
- The Connector to be removedvoid initialize() throws LifecycleException
LifecycleException
- If this server was already initialized.void addExecutor(Executor ex)
ex
- ExecutorExecutor[] findExecutors()
Executor getExecutor(java.lang.String name)
name
- Stringvoid removeExecutor(Executor ex)
ex
- Executorjava.security.SecureRandom getRandom()