## org.apache.catalina.mbeans
Class StandardContextMBean

    java.lang.Object
      org.apache.tomcat.util.modeler.BaseModelMBean
          org.apache.catalina.mbeans.StandardContextMBean

All Implemented Interfaces:
  javax.management.DynamicMBean, javax.management.MBeanRegistration, javax.management.modelmbean.ModelMBeanNotificationBroadcaster, javax.management.NotificationBroadcaster

    public class StandardContextMBean

extends BaseModelMBean

A ModelMBean implementation for the `org.apache.catalina.core.StandardContext` component.

Version:
  $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $
Author:
  Amy Roh

Field Summary
`protected ManagedBean` `managed` The `ManagedBean` information describing this MBean.
`protected Registry` `registry` The configuration information registry for our managed beans.

Fields inherited from class org.apache.tomcat.util.modeler.BaseModelMBean
`attributeBroadcaster, generalBroadcaster, managedBean, oname, resource, resourceType`

Constructor Summary
`StandardContextMBean()` Construct a `ModelMBean` with default `ModelMBeanInfo` information.

Method Summary
`java.lang.String` `addEnvironment(java.lang.String envName, java.lang.String type)` Add an environment entry for this web application.
`java.lang.String` `addResource(java.lang.String resourceName, java.lang.String type)` Add a resource reference for this web application.
`java.lang.String` `addResourceLink(java.lang.String resourceLinkName, java.lang.String global, java.lang.String name, java.lang.String type)` Add a resource link for this web application.
`java.lang.String[]` `getEnvironments()` Return the MBean Names of the set of defined environment entries for this web application
`java.lang.String[]` `getResourceLinks()` Return the MBean Names of all the defined resource links for this application
`java.lang.String[]` `getResources()` Return the MBean Names of all the defined resource references for this application.
`javax.naming.directory.DirContext` `getStaticResources()` Return the naming resources associated with this web application.
`java.lang.String[]` `getWelcomeFiles()` Return the naming resources associated with this web application.
`void` `reload()` Return the naming resources associated with this web application.
`void` `removeEnvironment(java.lang.String envName)` Remove any environment entry with the specified name.
`void` `removeResource(java.lang.String resourceName)` Remove any resource reference with the specified name.
`void` `removeResourceLink(java.lang.String resourceLinkName)` Remove any resource link with the specified name.

Methods inherited from class org.apache.tomcat.util.modeler.BaseModelMBean

`addAttributeChangeNotificationListener, addNotificationListener, getAttribute, getAttributes, getClassName, getJmxName, getManagedResource, getMBeanInfo, getModelerType, getNotificationInfo, getObjectName, invoke, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeAttributeChangeNotificationListener, removeNotificationListener, removeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setAttribute, setAttributes, setManagedBean, setManagedResource, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### registry

    protected Registry registry

  The configuration information registry for our managed beans.

### managed

    protected ManagedBean managed

  The `ManagedBean` information describing this MBean.

Constructor Detail

### StandardContextMBean

    public StandardContextMBean()
                         throws javax.management.MBeanException,
                                javax.management.RuntimeOperationsException

  Construct a `ModelMBean` with default `ModelMBeanInfo` information.

  Throws:
    `javax.management.MBeanException` - if the initializer of an object throws an exception
    `javax.management.RuntimeOperationsException` - if an IllegalArgumentException occurs

Method Detail

### reload

    public void reload()

  Return the naming resources associated with this web application.

### getEnvironments

    public java.lang.String[] getEnvironments()

  Return the MBean Names of the set of defined environment entries for this web application

### getResources

    public java.lang.String[] getResources()

  Return the MBean Names of all the defined resource references for this application.

### getResourceLinks

    public java.lang.String[] getResourceLinks()

  Return the MBean Names of all the defined resource links for this application

### getStaticResources

    public javax.naming.directory.DirContext getStaticResources()

  Return the naming resources associated with this web application.

### getWelcomeFiles

    public java.lang.String[] getWelcomeFiles()

  Return the naming resources associated with this web application.

### addEnvironment

    public java.lang.String addEnvironment(java.lang.String envName,
                                           java.lang.String type)
                                    throws javax.management.MalformedObjectNameException

  Add an environment entry for this web application.

  Parameters:
    `envName` - New environment entry name
  Throws:
    `javax.management.MalformedObjectNameException`

### addResource

    public java.lang.String addResource(java.lang.String resourceName,
                                        java.lang.String type)
                                 throws javax.management.MalformedObjectNameException

  Add a resource reference for this web application.

  Parameters:
    `resourceName` - New resource reference name
  Throws:
    `javax.management.MalformedObjectNameException`

### addResourceLink

    public java.lang.String addResourceLink(java.lang.String resourceLinkName,
                                            java.lang.String global,
                                            java.lang.String name,
                                            java.lang.String type)
                                     throws javax.management.MalformedObjectNameException

  Add a resource link for this web application.

  Parameters:
    `resourceLinkName` - New resource link name
  Throws:
    `javax.management.MalformedObjectNameException`

### removeEnvironment

    public void removeEnvironment(java.lang.String envName)

  Remove any environment entry with the specified name.

  Parameters:
    `envName` - Name of the environment entry to remove

### removeResource

    public void removeResource(java.lang.String resourceName)

  Remove any resource reference with the specified name.

  Parameters:
    `resourceName` - Name of the resource reference to remove

### removeResourceLink

    public void removeResourceLink(java.lang.String resourceLinkName)

  Remove any resource link with the specified name.

  Parameters:
    `resourceLinkName` - Name of the resource reference to remove

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.