addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this component.
listener
- The listener to add
addService
public void addService(Service service)
Add a new Service to the set of defined Services.
- addService in interface Server
service
- The Service to be added
await
public void await()
Wait until a proper shutdown command is received, then return.
- await in interface Server
findLifecycleListeners
public LifecycleListener[] findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle. If this
Lifecycle has no listeners registered, a zero-length array is returned.
- findLifecycleListeners in interface Lifecycle
findService
public Service findService(String name)
Return the specified Service (if it exists); otherwise return
null
.
- findService in interface Server
name
- Name of the Service to be returned
findServices
public Service[] findServices()
Return the set of Services defined within this Server.
- findServices in interface Server
getDebug
public int getDebug()
Return the debugging detail level.
getDomain
public String getDomain()
getGlobalNamingContext
public javax.naming.Context getGlobalNamingContext()
Return the global naming resources context.
getInfo
public String getInfo()
Return descriptive information about this Server implementation and
the corresponding version number, in the format
<description>/<version>
.
- getInfo in interface Server
getObjectName
public ObjectName getObjectName()
getPort
public int getPort()
Return the port number we listen to for shutdown commands.
- getPort in interface Server
getServiceNames
public ObjectName[] getServiceNames()
getShutdown
public String getShutdown()
Return the shutdown command string we are waiting for.
- getShutdown in interface Server
init
public void init()
throws Exception
initialize
public void initialize()
throws LifecycleException
Invoke a pre-startup initialization. This is used to allow connectors
to bind to restricted ports under Unix operating environments.
- initialize in interface Server
postDeregister
public void postDeregister()
postRegister
public void postRegister(Boolean registrationDone)
preDeregister
public void preDeregister()
throws Exception
preRegister
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws Exception
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener from this component.
listener
- The listener to remove
removeService
public void removeService(Service service)
Remove the specified Service from the set associated from this
Server.
- removeService in interface Server
service
- The Service to be removed
setDebug
public void setDebug(int debug)
Set the debugging detail level.
debug
- The new debugging detail level
setGlobalNamingContext
public void setGlobalNamingContext(javax.naming.Context globalNamingContext)
Set the global naming resources context.
globalNamingContext
- The new global naming resource context
setGlobalNamingResources
public void setGlobalNamingResources(NamingResources globalNamingResources)
Set the global naming resources.
- setGlobalNamingResources in interface Server
globalNamingResources
- The new global naming resources
setPort
public void setPort(int port)
Set the port number we listen to for shutdown commands.
- setPort in interface Server
port
- The new port number
setShutdown
public void setShutdown(String shutdown)
Set the shutdown command we are waiting for.
- setShutdown in interface Server
shutdown
- The new shutdown command
start
public void start()
throws LifecycleException
Prepare for the beginning of active use of the public methods of this
component. This method should be called before any of the public
methods of this component are utilized. It should also send a
LifecycleEvent of type START_EVENT to any registered listeners.
- start in interface Lifecycle
LifecycleException
- if this component detects a fatal error
that prevents this component from being used
stop
public void stop()
throws LifecycleException
Gracefully terminate the active use of the public methods of this
component. This method should be the last one called on a given
instance of this component. It should also send a LifecycleEvent
of type STOP_EVENT to any registered listeners.
- stop in interface Lifecycle
LifecycleException
- if this component detects a fatal error
that needs to be reported
storeConfig
public void storeConfig()
throws Exception
Write the configuration information for this entire Server
out to the server.xml configuration file.
storeContext
public void storeContext(Context context)
throws Exception
Write the configuration information for Context
out to the specified configuration file.
toString
public String toString()
Return a String representation of this component.