Top Description Fields Constructors Methods
org.apache.catalina.mbeans

public Class NamingResourcesMBean

extends BaseModelMBean
Class Inheritance
Imports
java.util.ArrayList, .List, javax.management.MalformedObjectNameException, .ObjectName, org.apache.catalina.deploy.NamingResourcesImpl, org.apache.tomcat.util.descriptor.web.ContextEnvironment, .ContextResource, .ContextResourceLink, org.apache.tomcat.util.modeler.BaseModelMBean, .ManagedBean, .Registry, org.apache.tomcat.util.res.StringManager

A ModelMBean implementation for the org.apache.catalina.deploy.NamingResourcesImpl component.

Author
Amy Roh

Field Summary

Modifier and TypeField and Description
protected final ManagedBean
managed

The ManagedBean information describing this MBean.

protected final Registry
registry

The configuration information registry for our managed beans.

private static final StringManager
Inherited from org.apache.tomcat.util.modeler.BaseModelMBean:
attributeBroadcastergeneralBroadcastermanagedBeanonameresourceresourceType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the object name of the new environment entry
addEnvironment
(String
New environment entry name
envName
,
String
The type of the new environment entry
type
,
String
The value of the new environment entry
value
)

Add an environment entry for this web application.

public String

Returns:

the object name of the new resource
addResource
(String
New resource reference name
resourceName
,
String
New resource reference type
type
)

Add a resource reference for this web application.

public String[]

Returns:

an array of object names as strings
getEnvironments
()

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

public String[]

Returns:

an array of object names as strings
getResources
()

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

public void
removeEnvironment(String
Name of the environment entry to remove
envName
)

Remove any environment entry with the specified name.

public void
removeResource(String
Name of the resource reference to remove
resourceName
)

Remove any resource reference with the specified name.

Inherited from org.apache.tomcat.util.modeler.BaseModelMBean:
addAttributeChangeNotificationListeneraddNotificationListenergetAttributegetAttributesgetClassNamegetJmxNamegetManagedResourcegetMBeanInfogetModelerTypegetNotificationInfogetObjectNameinvokepostDeregisterpostRegisterpreDeregisterpreRegisterremoveAttributeChangeNotificationListenerremoveNotificationListenersendAttributeChangeNotificationsendAttributeChangeNotificationsendNotificationsendNotificationsetAttributesetAttributessetManagedBeansetManagedResourcetoString

Field Detail

managedback to summary
protected final ManagedBean managed

The ManagedBean information describing this MBean.

registryback to summary
protected final Registry registry

The configuration information registry for our managed beans.

smback to summary
private static final StringManager sm

Hides org.apache.tomcat.util.modeler.BaseModelMBean.sm.

Constructor Detail

NamingResourcesMBeanback to summary
public NamingResourcesMBean()

Method Detail

addEnvironmentback to summary
public String addEnvironment(String envName, String type, String value) throws MalformedObjectNameException

Add an environment entry for this web application.

Parameters
envName:String

New environment entry name

type:String

The type of the new environment entry

value:String

The value of the new environment entry

Returns:String

the object name of the new environment entry

Exceptions
MalformedObjectNameException:
if the object name was invalid
addResourceback to summary
public String addResource(String resourceName, String type) throws MalformedObjectNameException

Add a resource reference for this web application.

Parameters
resourceName:String

New resource reference name

type:String

New resource reference type

Returns:String

the object name of the new resource

Exceptions
MalformedObjectNameException:
if the object name was invalid
getEnvironmentsback to summary
public String[] getEnvironments()

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

Returns:String[]

an array of object names as strings

getResourcesback to summary
public String[] getResources()

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

Returns:String[]

an array of object names as strings

removeEnvironmentback to summary
public void removeEnvironment(String envName)

Remove any environment entry with the specified name.

Parameters
envName:String

Name of the environment entry to remove

removeResourceback to summary
public void removeResource(String resourceName)

Remove any resource reference with the specified name.

Parameters
resourceName:String

Name of the resource reference to remove