AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_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.
|
void |
await()
Wait until a proper shutdown command is received, then return.
|
List<LifecycleListener> |
findLifecycleListeners()
Gets the (possibly empty) list of lifecycle listeners
associated with this StandardServer.
|
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.
|
int |
getDebug()
Return the debugging detail level.
|
String |
getDomain() |
Context |
getGlobalNamingContext()
Return the global naming resources context.
|
NamingResources |
getGlobalNamingResources()
Return the global naming resources.
|
String |
getInfo()
Return descriptive information about this Server implementation and
the corresponding version number, in the format
<description>/<version>. |
ObjectName |
getObjectName() |
int |
getPort()
Return the port number we listen to for shutdown commands.
|
ObjectName[] |
getServiceNames() |
String |
getShutdown()
Return the shutdown command string we are waiting for.
|
void |
init() |
void |
initialize()
Invoke a pre-startup initialization.
|
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 |
setDebug(int debug)
Set the debugging detail level.
|
void |
setGlobalNamingContext(Context globalNamingContext)
Set the global naming resources context.
|
void |
setGlobalNamingResources(NamingResources globalNamingResources)
Set the global naming resources.
|
void |
setPort(int port)
Set the port number we listen to for shutdown commands.
|
void |
setShutdown(String shutdown)
Set the shutdown command we are waiting for.
|
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.
|
public StandardServer()
public int getDebug()
public void setDebug(int debug)
debug - The new debugging detail levelpublic Context getGlobalNamingContext()
public void setGlobalNamingContext(Context globalNamingContext)
globalNamingContext - The new global naming resource contextpublic NamingResources getGlobalNamingResources()
getGlobalNamingResources in interface Serverpublic void setGlobalNamingResources(NamingResources globalNamingResources)
setGlobalNamingResources in interface ServerglobalNamingResources - The new global naming resourcespublic String getInfo()
<description>/<version>.public int getPort()
public void setPort(int port)
public String getShutdown()
getShutdown in interface Serverpublic void setShutdown(String shutdown)
setShutdown in interface Servershutdown - The new shutdown commandpublic void addService(Service service)
addService in interface Serverservice - The Service to be addedpublic void await()
public Service findService(String name)
null.findService in interface Servername - Name of the Service to be returnedpublic Service[] findServices()
findServices in interface Serverpublic ObjectName[] getServiceNames()
public void removeService(Service service)
removeService in interface Serverservice - 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 Lifecyclelistener - The listener to addpublic List<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 initialize()
throws LifecycleException
initialize in interface ServerLifecycleException - If this server was already initialized.public ObjectName getObjectName()
public String getDomain()
Copyright © 2017. All rights reserved.