com.sun.appserv.management.base
Interface Container

All Superinterfaces:
AMX, AMXMBeanLogging, NotificationBroadcaster, NotificationEmitter
All Known Subinterfaces:
AdminServiceConfig, ApplicationMonitor, AvailabilityServiceConfig, BeanMonitor, ClusterConfig, ClusteredServerConfig, ClusterRefConfig, ConfigConfig, ConnectorConnectionPoolConfig, DomainConfig, DomainRoot, EJBContainerConfig, EJBModule, EJBModuleConfig, EJBModuleMonitor, EntityBeanMonitor, HTTPListenerConfig, HTTPServiceConfig, HTTPServiceMonitor, HTTPServiceVirtualServerMonitor, IIOPListenerConfig, IIOPServiceConfig, J2EEApplication, J2EEApplicationConfig, J2EEDomain, J2EEServer, JavaConfig, JDBCResource, JMSServiceConfig, JMXConnectorConfig, LBConfig, LogServiceConfig, ManagementRuleConfig, ManagementRulesConfig, MessageDrivenBeanMonitor, MessageSecurityConfig, MonitoringRoot, MonitoringServiceConfig, NodeAgentConfig, NotificationServiceMgr, ProviderConfig, ResourceAdapterModule, SecurityMapConfig, SecurityServiceConfig, ServerConfig, ServerRefConfig, ServerRootMonitor, SessionConfig, SessionManagerConfig, SSLConfigContainer, StandaloneServerConfig, StatefulSessionBeanMonitor, StatelessSessionBeanMonitor, VirtualServerConfig, WebContainerConfig, WebModule, WebModuleConfig, WebModuleVirtualServerMonitor, WebServiceEndpointConfig

public interface Container
extends AMX

All MBeans which logically contain other MBeans implement this interface; such an MBean is considered a Container, and the contained MBean is considered a Containee. The interface indicates the potential to contain other MBeans; at any given time MBeans may or may not be contained.


Field Summary
static String ATTR_CONTAINEE_J2EE_TYPES
          Attribute returned by getContaineeJ2EETypes().
 
Fields inherited from interface com.sun.appserv.management.base.AMX
FULL_TYPE_DELIM, GROUP_CONFIGURATION, GROUP_JSR77, GROUP_MONITORING, GROUP_OTHER, GROUP_UTILITY, J2EE_TYPE_KEY, JMX_DOMAIN, NAME_KEY, NO_NAME, NOTIFICATION_PREFIX, NULL_NAME
 
Method Summary
<T extends AMX>
Set<T>
getByNameContaineeSet(Set<String> j2eeTypes, String name)
           
<T extends AMX>
T
getContainee(String j2eeType)
          Obtain the singleton MBean having the specified type.
<T extends AMX>
T
getContainee(String j2eeType, String name)
          Get a singleton containee having the specified j2eeType and name.
 Set<String> getContaineeJ2EETypes()
           
<T extends AMX>
Map<String,T>
getContaineeMap(String j2eeType)
          Each key in the resulting Map is a String which is the value of the AMX.NAME_KEY for that AMX, which is the value.
<T extends AMX>
Set<T>
getContaineeSet()
          Same as getContaineeSet( getContaineeJ2EETypes() )
<T extends AMX>
Set<T>
getContaineeSet(Set<String> j2eeTypes)
           
<T extends AMX>
Set<T>
getContaineeSet(String j2eeType)
           
<T extends AMX>
Map<String,Map<String,T>>
getMultiContaineeMap(Set<String> j2eeTypes)
          Return a Map keyed by j2eeType.
 
Methods inherited from interface com.sun.appserv.management.base.AMX
getContainer, getDomainRoot, getFullType, getGroup, getJ2EEType, getName, isDAS
 
Methods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 
Methods inherited from interface com.sun.appserv.management.base.AMXMBeanLogging
getMBeanLoggerName, getMBeanLogLevel, setMBeanLogLevel
 

Field Detail

ATTR_CONTAINEE_J2EE_TYPES

static final String ATTR_CONTAINEE_J2EE_TYPES
Attribute returned by getContaineeJ2EETypes().

See Also:
Constant Field Values
Method Detail

getContaineeJ2EETypes

Set<String> getContaineeJ2EETypes()
Returns:
Set of String of all possible j2eeTypes contained within this item
See Also:
Util.getNamesSet(java.util.Set)

getMultiContaineeMap

<T extends AMX> Map<String,Map<String,T>> getMultiContaineeMap(Set<String> j2eeTypes)
Return a Map keyed by j2eeType. The value corresponding to each key (j2eeType) is another Map, as returned from getContaineeMap(java.lang.String).

If the passed Set is null, then all types are obtained. Pass the set returned from getContaineeJ2EETypes() to get all currently present containees.

Parameters:
j2eeTypes - the j2eeTypes to look for, or null for all
Returns:
Map (possibly empty) of j2eeType=<Map of name=AMX>

getContaineeMap

<T extends AMX> Map<String,T> getContaineeMap(String j2eeType)
Each key in the resulting Map is a String which is the value of the AMX.NAME_KEY for that AMX, which is the value.

Parameters:
j2eeType - the j2eeType to look for
Returns:
Map name=AMX

getContainee

<T extends AMX> T getContainee(String j2eeType)
Obtain the singleton MBean having the specified type.

Parameters:
j2eeType -
Returns:
AMX of specified j2eeType or null if not present
Throws:
IllegalArgumentException - if there is more than one item of this type
See Also:
Util.getNamesSet(java.util.Set)

getContaineeSet

<T extends AMX> Set<T> getContaineeSet(String j2eeType)
Returns:
all containees having the specified j2eeType.
See Also:
Util.getNamesSet(java.util.Set)

getContaineeSet

<T extends AMX> Set<T> getContaineeSet()
Same as getContaineeSet( getContaineeJ2EETypes() )

Returns:
all containees of any j2eeType
See Also:
Util.getNamesSet(java.util.Set), getContaineeSet(java.util.Set)

getContaineeSet

<T extends AMX> Set<T> getContaineeSet(Set<String> j2eeTypes)
Returns:
all containees having the specified j2eeType(s).
See Also:
Util.getNamesSet(java.util.Set), getMultiContaineeMap(java.util.Set)

getByNameContaineeSet

<T extends AMX> Set<T> getByNameContaineeSet(Set<String> j2eeTypes,
                                             String name)
Returns:
all containees having one of the specified types and the specified name.
See Also:
Util.getNamesSet(java.util.Set)

getContainee

<T extends AMX> T getContainee(String j2eeType,
                               String name)
Get a singleton containee having the specified j2eeType and name.

Parameters:
j2eeType - the j2eeType of the contained
name - the name of the contained (as found in "name" property)
Returns:
AMX or null if not found
See Also:
Util.getNamesSet(java.util.Set)