org.apache.catalina.core
public class StandardService extends Object implements Lifecycle, Service, MBeanRegistration
Service
interface. The
associated Container is generally an instance of Engine, but this is
not required.
Field Summary | |
---|---|
protected Connector[] | connectors
The set of Connectors associated with this Service. |
protected Container | container
The Container associated with this Service. |
protected ObjectName | controller |
protected String | domain |
protected ArrayList<Executor> | executors |
protected boolean | initialized
Has this component been initialized? |
protected MBeanServer | mserver |
protected ObjectName | oname |
protected String | suffix |
protected PropertyChangeSupport | support
The property change support for this component. |
protected String | type |
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 |
void | addLifecycleListener(LifecycleListener listener)
Add a LifecycleEvent listener to this component.
|
void | addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this component.
|
void | destroy() |
Connector[] | findConnectors()
Find and return the set of Connectors associated with this Service. |
Executor[] | findExecutors()
Retrieves all executors |
LifecycleListener[] | findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle. |
ObjectName[] | getConnectorNames() |
Container | getContainer()
Return the Container that handles requests for all
Connectors associated with this Service. |
ObjectName | getContainerName() |
String | getDomain() |
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. |
ObjectName | getObjectName() |
Server | getServer()
Return the Server with which we are associated (if any). |
void | init() |
void | initialize()
Invoke a pre-startup initialization. |
void | postDeregister() |
void | postRegister(Boolean registrationDone) |
void | preDeregister() |
ObjectName | preRegister(MBeanServer server, ObjectName name) |
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 | removeLifecycleListener(LifecycleListener listener)
Remove a LifecycleEvent listener from this component.
|
void | removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener from this component.
|
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).
|
void | start()
Prepare for the beginning of active use of the public methods of this
component. |
void | stop()
Gracefully terminate the active use of the public methods of this
component. |
String | toString()
Return a String representation of this component. |
Parameters: connector The Connector to be added
Parameters: ex Executor
Parameters: listener The listener to add
Parameters: listener The listener to add
Returns: Executor[]
Container
that handles requests for all
Connectors
associated with this Service.Parameters: name String
Returns: Executor
<description>/<version>
.Server
with which we are associated (if any).Parameters: connector The Connector to be removed
Parameters: ex Executor
Parameters: listener The listener to remove
Parameters: listener The listener to remove
Container
that handles requests for all
Connectors
associated with this Service.
Parameters: container The new Container
Parameters: name The new service name
Server
with which we are associated (if any).
Parameters: server The server that owns this Service
Throws: LifecycleException if this component detects a fatal error that prevents this component from being used
Throws: LifecycleException if this component detects a fatal error that needs to be reported