com.sun.appserv.management.base
Interface QueryMgr

All Superinterfaces:
AMX, AMXMBeanLogging, NotificationBroadcaster, NotificationEmitter, Singleton, Utility

public interface QueryMgr
extends AMX, Utility, Singleton

Supports various types of queries to find s based on various Attributes.


Field Summary
static String J2EE_TYPE
          The j2eeType as returned by AMX.getJ2EEType().
 
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
 Set<ObjectName> queryAllObjectNameSet()
           
 Set<AMX> queryAllSet()
           
 Set<ObjectName> queryInterfaceObjectNameSet(String interfaceName, Set<ObjectName> candidateObjectNames)
           
<T extends AMX>
Set<T>
queryInterfaceSet(String interfaceName, Set<ObjectName> candidateObjectNames)
          Return all AMX that implement the specified interface, which may be any interface.
 Set<ObjectName> queryJ2EENameObjectNameSet(String nameValue)
           
<T extends AMX>
Set<T>
queryJ2EENameSet(String nameValue)
          Return all AMX whose name is equal to 'nameValue'.
 Set<ObjectName> queryJ2EETypeNameObjectNameSet(String j2eeType, String name)
           
 String[] queryJ2EETypeNames(String j2eeType)
          Calls queryJ2EETypeSet( j2eeTypeValue ), then creates an array consisting of the names of each of the resulting objects.
<T extends AMX>
Set<T>
queryJ2EETypeNameSet(String j2eeType, String name)
           
 Set<ObjectName> queryJ2EETypeObjectNameSet(String j2eeTypeValue)
           
<T extends AMX>
Set<T>
queryJ2EETypeSet(String j2eeTypeValue)
          Return all AMX whose j2eeType is equal to 'j2eeTypeValue.
 Set<ObjectName> queryJ2EETypesObjectNameSet(Set<String> j2eeTypes)
           
<T extends AMX>
Set<T>
queryJ2EETypesSet(Set<String> j2eeTypes)
          Return all AMX whose j2eeType is equal to any specified in 'j2eeTypes'.
 Set<ObjectName> queryPatternObjectNameSet(ObjectName pattern)
           
 Set<ObjectName> queryPatternObjectNameSet(String domain, String props)
           
<T extends AMX>
Set<T>
queryPatternSet(ObjectName pattern)
          Return all AMX whose ObjectName matches the supplied ObjectName pattern, as defined by the JMX specification.
<T extends AMX>
Set<T>
queryPatternSet(String domain, String props)
          Makes an ObjectName pattern, then calls queryPatternSet( pat )
 Set<ObjectName> queryPropsObjectNameSet(String props)
           
<T extends AMX>
Set<T>
queryPropsSet(String props)
          Return all objects that match the specified properties in the JMX domain governed by this QueryMgr.
<T extends AMX>
T
querySingletonJ2EEType(String j2eeTypeValue)
          Calls getJ2EETypeSet( j2eeTypeValue ) and extracts the single result.
 Set<ObjectName> queryWildObjectNameSet(String[] wildKeys, String[] wildValues)
           
<T extends AMX>
Set<T>
queryWildSet(String[] wildKeys, String[] wildValues)
          Return all AMX whose whose ObjectName matches all property expressions.
 
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

J2EE_TYPE

static final String J2EE_TYPE
The j2eeType as returned by AMX.getJ2EEType().

See Also:
Constant Field Values
Method Detail

querySingletonJ2EEType

<T extends AMX> T querySingletonJ2EEType(String j2eeTypeValue)
Calls getJ2EETypeSet( j2eeTypeValue ) and extracts the single result. Throws an exception if more than one object is found.

Parameters:
j2eeTypeValue - the value for the j2eeType property
Returns:
ObjectName or null if not found
Throws:
exception - if not found

queryJ2EETypesSet

<T extends AMX> Set<T> queryJ2EETypesSet(Set<String> j2eeTypes)
Return all AMX whose j2eeType is equal to any specified in 'j2eeTypes'.

Parameters:
j2eeTypes - Set of String (j2eeType values).
Returns:
Set of AMX or empty Set if none

queryJ2EETypesObjectNameSet

Set<ObjectName> queryJ2EETypesObjectNameSet(Set<String> j2eeTypes)
See Also:
queryJ2EETypesSet(java.util.Set)

queryJ2EETypeSet

<T extends AMX> Set<T> queryJ2EETypeSet(String j2eeTypeValue)
Return all AMX whose j2eeType is equal to 'j2eeTypeValue. Legal values include those defined in J2EETypes and those defined in XTypes

Parameters:
j2eeTypeValue - the value for the j2eeType property
Returns:
Set of AMX or empty Set if none

queryJ2EETypeObjectNameSet

Set<ObjectName> queryJ2EETypeObjectNameSet(String j2eeTypeValue)
Returns:
Set of ObjectName

queryJ2EENameSet

<T extends AMX> Set<T> queryJ2EENameSet(String nameValue)
Return all AMX whose name is equal to 'nameValue'.

Parameters:
nameValue - the value for the j2eeType property
Returns:
Set of AMX or empty Set if none

queryJ2EENameObjectNameSet

Set<ObjectName> queryJ2EENameObjectNameSet(String nameValue)
Returns:
Set of ObjectName

queryJ2EETypeNames

String[] queryJ2EETypeNames(String j2eeType)
Calls queryJ2EETypeSet( j2eeTypeValue ), then creates an array consisting of the names of each of the resulting objects. Note that some names could be identical.

Parameters:
j2eeType - the value for the j2eeType property
Returns:
array of names

queryJ2EETypeNameSet

<T extends AMX> Set<T> queryJ2EETypeNameSet(String j2eeType,
                                            String name)
Returns:
Set containing all items that have the matching j2eeType and name

queryJ2EETypeNameObjectNameSet

Set<ObjectName> queryJ2EETypeNameObjectNameSet(String j2eeType,
                                               String name)
Returns:
Set containing all items that have the matching j2eeType and name

queryPatternSet

<T extends AMX> Set<T> queryPatternSet(ObjectName pattern)
Return all AMX whose ObjectName matches the supplied ObjectName pattern, as defined by the JMX specification.

This can be a relatively expensive operation if care is not taken to use a suitably constrained pattern. For example, querying for "*:*" will return every available AMX.

Parameters:
pattern - an ObjectName containing a pattern as defined by JMX
Returns:
Set of AMX or empty Set if none

queryPatternObjectNameSet

Set<ObjectName> queryPatternObjectNameSet(ObjectName pattern)
Returns:
Set of ObjectName

queryPatternSet

<T extends AMX> Set<T> queryPatternSet(String domain,
                                       String props)
Makes an ObjectName pattern, then calls queryPatternSet( pat )

Parameters:
domain - the domain or "*" for all
props - a comma-separated Properties string
Returns:
Set of AMX or empty Set if none

queryPatternObjectNameSet

Set<ObjectName> queryPatternObjectNameSet(String domain,
                                          String props)
Returns:
Set of ObjectName

queryPropsSet

<T extends AMX> Set<T> queryPropsSet(String props)
Return all objects that match the specified properties in the JMX domain governed by this QueryMgr.

Parameters:
props - a String containing one or more name/value properties

queryPropsObjectNameSet

Set<ObjectName> queryPropsObjectNameSet(String props)
Returns:
Set of ObjectName

queryWildSet

<T extends AMX> Set<T> queryWildSet(String[] wildKeys,
                                    String[] wildValues)
Return all AMX whose whose ObjectName matches all property expressions. Each property expression consists of a key expression, and a value expression; an expression which is null is considered a "*" (match all).

Both key and value expressions may be wildcarded with the "*" character, which matches 0 or more characters.

Each property expression is matched in turn against the ObjectName. If a match fails, the ObjectName is not included in the result. If all matches succeed, then the ObjectName is included.

Caution should be used in choosing the element type of the returned set. Unless certain that a uniform type will be produced, Set<AMX> is usually the most appropriate type eg: Set<AMX> result = queryWildSet(...);

Parameters:
wildKeys - one or more name expressions, null means all
wildValues - one or more value expressions, null means all
Returns:
Set of AMX or empty Set if none

queryWildObjectNameSet

Set<ObjectName> queryWildObjectNameSet(String[] wildKeys,
                                       String[] wildValues)
Returns:
Set of ObjectName

queryInterfaceSet

<T extends AMX> Set<T> queryInterfaceSet(String interfaceName,
                                         Set<ObjectName> candidateObjectNames)
Return all AMX that implement the specified interface, which may be any interface. This is the same as querying for all s for their interfaces, then returning the set for which the interface extends the specified interface.

Parameters:
interfaceName - classname of the desired interface
candidateObjectNames - optional (may be null) Set of ObjectName to which the search is limited
Returns:
Set of AMX or empty Set if none

queryInterfaceObjectNameSet

Set<ObjectName> queryInterfaceObjectNameSet(String interfaceName,
                                            Set<ObjectName> candidateObjectNames)
Returns:
Set of ObjectName

queryAllSet

Set<AMX> queryAllSet()
Returns:
Set of all AMX
See Also:
queryAllObjectNameSet()

queryAllObjectNameSet

Set<ObjectName> queryAllObjectNameSet()
Returns:
Set of ObjectName of all AMX
See Also:
queryAllSet()