|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.core.StandardService
public class StandardService
Standard implementation of the 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 javax.management.ObjectName |
controller
|
protected java.lang.String |
domain
|
protected java.util.ArrayList<Executor> |
executors
|
protected boolean |
initialized
Has this component been initialized? |
protected javax.management.MBeanServer |
mserver
|
protected javax.management.ObjectName |
oname
|
protected java.lang.String |
suffix
|
protected java.beans.PropertyChangeSupport |
support
The property change support for this component. |
protected java.lang.String |
type
|
Fields inherited from interface org.apache.catalina.Lifecycle |
---|
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT |
Constructor Summary | |
---|---|
StandardService()
|
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(java.beans.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. |
javax.management.ObjectName[] |
getConnectorNames()
|
Container |
getContainer()
Return the Container that handles requests for all
Connectors associated with this Service. |
javax.management.ObjectName |
getContainerName()
|
java.lang.String |
getDomain()
|
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> . |
java.lang.String |
getName()
Return the name of this Service. |
javax.management.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(java.lang.Boolean registrationDone)
|
void |
preDeregister()
|
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.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(java.beans.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(java.lang.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. |
java.lang.String |
toString()
Return a String representation of this component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.beans.PropertyChangeSupport support
protected Connector[] connectors
protected java.util.ArrayList<Executor> executors
protected Container container
protected boolean initialized
protected java.lang.String type
protected java.lang.String domain
protected java.lang.String suffix
protected javax.management.ObjectName oname
protected javax.management.ObjectName controller
protected javax.management.MBeanServer mserver
Constructor Detail |
---|
public StandardService()
Method Detail |
---|
public Container getContainer()
Container
that handles requests for all
Connectors
associated with this Service.
getContainer
in interface Service
public void setContainer(Container container)
Container
that handles requests for all
Connectors
associated with this Service.
setContainer
in interface Service
container
- The new Containerpublic javax.management.ObjectName getContainerName()
public java.lang.String getInfo()
<description>/<version>
.
getInfo
in interface Service
public java.lang.String getName()
getName
in interface Service
public void setName(java.lang.String name)
setName
in interface Service
name
- The new service namepublic Server getServer()
Server
with which we are associated (if any).
getServer
in interface Service
public void setServer(Server server)
Server
with which we are associated (if any).
setServer
in interface Service
server
- The server that owns this Servicepublic void addConnector(Connector connector)
addConnector
in interface Service
connector
- The Connector to be addedpublic javax.management.ObjectName[] getConnectorNames()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener to addpublic Connector[] findConnectors()
findConnectors
in interface Service
public void removeConnector(Connector connector)
removeConnector
in interface Service
connector
- The Connector to be removedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener to removepublic java.lang.String toString()
toString
in class java.lang.Object
public void addLifecycleListener(LifecycleListener listener)
addLifecycleListener
in interface Lifecycle
listener
- The listener to addpublic LifecycleListener[] findLifecycleListeners()
findLifecycleListeners
in interface Lifecycle
public void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener
in interface Lifecycle
listener
- The listener to removepublic void addExecutor(Executor ex)
addExecutor
in interface Service
ex
- Executorpublic Executor[] findExecutors()
findExecutors
in interface Service
public Executor getExecutor(java.lang.String name)
getExecutor
in interface Service
name
- String
public void removeExecutor(Executor ex)
removeExecutor
in interface Service
ex
- Executorpublic void start() throws LifecycleException
start
in interface Lifecycle
LifecycleException
- if this component detects a fatal error
that prevents this component from being usedpublic void stop() throws LifecycleException
stop
in interface Lifecycle
LifecycleException
- if this component detects a fatal error
that needs to be reportedpublic void initialize() throws LifecycleException
initialize
in interface Service
LifecycleException
- If this server was already initialized.public void destroy() throws LifecycleException
LifecycleException
public void init()
public javax.management.ObjectName getObjectName()
public java.lang.String getDomain()
public javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name) throws java.lang.Exception
preRegister
in interface javax.management.MBeanRegistration
java.lang.Exception
public void postRegister(java.lang.Boolean registrationDone)
postRegister
in interface javax.management.MBeanRegistration
public void preDeregister() throws java.lang.Exception
preDeregister
in interface javax.management.MBeanRegistration
java.lang.Exception
public void postDeregister()
postDeregister
in interface javax.management.MBeanRegistration
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |