|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.core.StandardServer
Standard implementation of the Server interface, available for use (but not required) when deploying and starting Catalina.
Field Summary | |
protected java.beans.PropertyChangeSupport |
support
The property change support for this component. |
Fields inherited from interface org.apache.catalina.Lifecycle |
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, START_EVENT, STOP_EVENT |
Constructor Summary | |
StandardServer()
Construct a default instance of this class. |
Method Summary | |
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. |
void |
await()
Wait until a proper shutdown command is received, then return. |
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. |
int |
getDebug()
Return the debugging detail level. |
javax.naming.Context |
getGlobalNamingContext()
Return the global naming resources context. |
NamingResources |
getGlobalNamingResources()
Return the global naming resources. |
java.lang.String |
getInfo()
Return descriptive information about this Server implementation and the corresponding version number, in the format <description>/<version> . |
int |
getPort()
Return the port number we listen to for shutdown commands. |
java.lang.String |
getServerInfo()
Report the current Tomcat Server Release number |
java.lang.String |
getShutdown()
Return the shutdown command string we are waiting for. |
void |
initialize()
Invoke a pre-startup initialization. |
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 |
setDebug(int debug)
Set the debugging detail level. |
void |
setGlobalNamingContext(javax.naming.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(java.lang.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. |
void |
store()
Write the configuration information for this entire Server
out to the server.xml configuration file. |
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
Constructor Detail |
public StandardServer()
Method Detail |
public int getDebug()
public void setDebug(int debug)
debug
- The new debugging detail levelpublic javax.naming.Context getGlobalNamingContext()
public void setGlobalNamingContext(javax.naming.Context globalNamingContext)
globalNamingContext
- The new global naming resource contextpublic NamingResources getGlobalNamingResources()
getGlobalNamingResources
in interface Server
public void setGlobalNamingResources(NamingResources globalNamingResources)
setGlobalNamingResources
in interface Server
globalNamingResources
- The new global naming resourcespublic java.lang.String getInfo()
<description>/<version>
.
getInfo
in interface Server
public int getPort()
getPort
in interface Server
public void setPort(int port)
setPort
in interface Server
port
- The new port numberpublic java.lang.String getServerInfo()
public java.lang.String getShutdown()
getShutdown
in interface Server
public void setShutdown(java.lang.String shutdown)
setShutdown
in interface Server
shutdown
- The new shutdown commandpublic void addService(Service service)
addService
in interface Server
service
- The Service to be addedpublic void await()
await
in interface Server
public Service findService(java.lang.String name)
null
.
findService
in interface Server
name
- Name of the Service to be returnedpublic Service[] findServices()
findServices
in interface Server
public void removeService(Service service)
removeService
in interface Server
service
- 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()
public void store() throws java.lang.Exception
Server
out to the server.xml configuration file.
InstanceNotFoundException
- if the managed resource object
cannot be found
MBeanException
- if the initializer of the object throws
an exception, or persistence is not supported
RuntimeOperationsException
- if an exception is reported
by the persistence mechanism
java.lang.Exception
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |