public final class StandardServer extends Object implements Lifecycle, Server, MBeanRegistration
Modifier and Type | Field and Description |
---|---|
protected String |
domain |
protected MBeanServer |
mserver |
protected ObjectName |
oname |
protected String |
suffix |
protected PropertyChangeSupport |
support
The property change support for this component.
|
protected 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(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(String name)
Return the specified Service (if it exists); otherwise return
null . |
Service[] |
findServices()
Return the set of Services defined within this Server.
|
String |
getDomain() |
String |
getInfo()
Return descriptive information about this Server implementation and
the corresponding version number, in the format
<description>/<version> . |
ObjectName |
getObjectName() |
String |
getServerInfo()
Report the current Tomcat Server Release number
|
ObjectName[] |
getServiceNames()
Return the JMX service names.
|
void |
init() |
void |
initialize()
Invoke a pre-startup initialization.
|
void |
postDeregister() |
void |
postRegister(Boolean registrationDone) |
void |
preDeregister() |
ObjectName |
preRegister(MBeanServer server,
ObjectName name) |
void |
removeLifecycleListener(LifecycleListener listener)
Remove a LifecycleEvent listener from this component.
|
void |
removePropertyChangeListener(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.
|
String |
toString()
Return a String representation of this component.
|
protected PropertyChangeSupport support
protected String type
protected String domain
protected String suffix
protected ObjectName oname
protected MBeanServer mserver
public StandardServer()
public String getInfo()
<description>/<version>
.public String getServerInfo()
public void addService(Service service)
addService
in interface Server
service
- The Service to be addedpublic Service findService(String name)
null
.findService
in interface Server
name
- Name of the Service to be returnedpublic Service[] findServices()
findServices
in interface Server
public ObjectName[] getServiceNames()
public void removeService(Service service)
removeService
in interface Server
service
- The Service to be removedpublic void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The listener to addpublic void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The listener to removepublic String toString()
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 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 Server
LifecycleException
- If this server was already initialized.public ObjectName getObjectName()
public String getDomain()
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
preRegister
in interface MBeanRegistration
Exception
public void postRegister(Boolean registrationDone)
postRegister
in interface MBeanRegistration
public void preDeregister() throws Exception
preDeregister
in interface MBeanRegistration
Exception
public void postDeregister()
postDeregister
in interface MBeanRegistration
Copyright © 2014 JBoss by Red Hat. All rights reserved.