public final class StandardServer extends java.lang.Object implements Lifecycle, Server, javax.management.MBeanRegistration
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
domain |
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 |
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT| Constructor and Description |
|---|
StandardServer()
Construct a default instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
addService(Service service)
Add a new Service to the set of defined Services.
|
LifecycleListener[] |
findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle.
|
Service |
findService(java.lang.String name)
Return the specified Service (if it exists); otherwise return
null. |
Service[] |
findServices()
Return the set of Services defined within this Server.
|
java.lang.String |
getDomain() |
java.lang.String |
getInfo()
Return descriptive information about this Server implementation and
the corresponding version number, in the format
<description>/<version>. |
javax.management.ObjectName |
getObjectName() |
java.lang.String |
getServerInfo()
Report the current Tomcat Server Release number
|
javax.management.ObjectName[] |
getServiceNames()
Return the JMX service names.
|
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 |
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 |
removeService(Service service)
Remove the specified Service from the set associated from this
Server.
|
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.
|
protected java.beans.PropertyChangeSupport support
protected java.lang.String type
protected java.lang.String domain
protected java.lang.String suffix
protected javax.management.ObjectName oname
protected javax.management.MBeanServer mserver
public StandardServer()
public java.lang.String getInfo()
<description>/<version>.public java.lang.String getServerInfo()
public void addService(Service service)
addService in interface Serverservice - The Service to be addedpublic Service findService(java.lang.String name)
null.findService in interface Servername - Name of the Service to be returnedpublic Service[] findServices()
findServices in interface Serverpublic javax.management.ObjectName[] getServiceNames()
public void removeService(Service service)
removeService in interface Serverservice - The Service to be removedpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener to addpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener to removepublic java.lang.String toString()
toString in class java.lang.Objectpublic void addLifecycleListener(LifecycleListener listener)
addLifecycleListener in interface Lifecyclelistener - The listener to addpublic LifecycleListener[] findLifecycleListeners()
findLifecycleListeners in interface Lifecyclepublic void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener in interface Lifecyclelistener - The listener to removepublic void start()
throws LifecycleException
start in interface LifecycleLifecycleException - if this component detects a fatal error
that prevents this component from being usedpublic void stop()
throws LifecycleException
stop in interface LifecycleLifecycleException - if this component detects a fatal error
that needs to be reportedpublic void init()
throws java.lang.Exception
java.lang.Exceptionpublic void initialize()
throws LifecycleException
initialize in interface ServerLifecycleException - If this server was already initialized.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.MBeanRegistrationjava.lang.Exceptionpublic void postRegister(java.lang.Boolean registrationDone)
postRegister in interface javax.management.MBeanRegistrationpublic void preDeregister()
throws java.lang.Exception
preDeregister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic void postDeregister()
postDeregister in interface javax.management.MBeanRegistration