| 
 | Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.catalina.core.StandardServer
public final class StandardServer
Standard implementation of the Server interface, available for use (but not required) when deploying and starting Catalina.
| Field Summary | |
|---|---|
| protected  java.lang.String | domain | 
| protected  javax.management.MBeanServer | mserver | 
| protected  javax.management.ObjectName | oname | 
| protected  java.lang.String | suffix | 
| protected  java.beans.PropertyChangeSupport | supportThe property change support for this component. | 
| protected  java.lang.String | type | 
| Fields inherited from interface org.apache.catalina.Lifecycle | 
|---|
| AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_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. | 
|  java.lang.String | getDomain() | 
|  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>. | 
|  javax.management.ObjectName | getObjectName() | 
|  int | getPort()Return the port number we listen to for shutdown commands. | 
|  java.lang.String | getServerInfo()Report the current Tomcat Server Release number | 
|  javax.management.ObjectName[] | getServiceNames()Return the JMX service names. | 
|  java.lang.String | getShutdown()Return the shutdown command string we are waiting for. | 
|  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 | 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 | stopAwait() | 
|  void | storeConfig()Write the configuration information for this entire Serverout to the server.xml configuration file. | 
|  void | storeContext(Context context)Write the configuration information for Contextout to the specified 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
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
| Constructor Detail | 
|---|
public StandardServer()
| Method Detail | 
|---|
public javax.naming.Context getGlobalNamingContext()
public void setGlobalNamingContext(javax.naming.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 java.lang.String getInfo()
<description>/<version>.
getInfo in interface Serverpublic java.lang.String getServerInfo()
public int getPort()
getPort in interface Serverpublic void setPort(int port)
setPort in interface Serverport - The new port numberpublic java.lang.String getShutdown()
getShutdown in interface Serverpublic void setShutdown(java.lang.String shutdown)
setShutdown in interface Servershutdown - The new shutdown commandpublic void addService(Service service)
addService in interface Serverservice - The Service to be addedpublic void stopAwait()
public void await()
await in interface Serverpublic 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.Object
public void storeConfig()
                 throws java.lang.Exception
Server
 out to the server.xml configuration file.
javax.management.InstanceNotFoundException - if the managed resource object cannot be found
javax.management.MBeanException - if the initializer of the object throws an exception, or
              persistence is not supported
javax.management.RuntimeOperationsException - if an exception is reported by the persistence mechanism
java.lang.Exception
public void storeContext(Context context)
                  throws java.lang.Exception
Context
 out to the specified configuration file.
javax.management.InstanceNotFoundException - if the managed resource object
  cannot be found
javax.management.MBeanException - if the initializer of the object throws
  an exception, or persistence is not supported
javax.management.RuntimeOperationsException - if an exception is reported
  by the persistence mechanism
java.lang.Exceptionpublic 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 remove
public void start()
           throws LifecycleException
start in interface LifecycleLifecycleException - if this component detects a fatal error
  that prevents this component from being used
public void stop()
          throws LifecycleException
stop in interface LifecycleLifecycleException - if this component detects a fatal error
  that needs to be reported
public void init()
          throws java.lang.Exception
java.lang.Exception
public 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.MBeanRegistration
public void preDeregister()
                   throws java.lang.Exception
preDeregister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic void postDeregister()
postDeregister in interface javax.management.MBeanRegistration| 
 | Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||