J2EE1.4 SDK

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 java.lang.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, NAME_KEY, NO_NAME, NULL_NAME
 
Fields inherited from interface com.sun.appserv.management.base.AMXMBeanLogging
LOG_RECORD_KEY, LOG_RECORD_NOTIFICATION_TYPE
 
Method Summary
 java.util.Set queryAllObjectNameSet()
           
 java.util.Set queryAllSet()
           
 java.util.Set queryInterfaceObjectNameSet(java.lang.String interfaceName, java.util.Set candidateObjectNames)
           
 java.util.Set queryInterfaceSet(java.lang.String interfaceName, java.util.Set candidateObjectNames)
          Return all AMX that implement the specified interface, which may be any interface.
 java.util.Set queryJ2EENameObjectNameSet(java.lang.String nameValue)
           
 java.util.Set queryJ2EENameSet(java.lang.String nameValue)
          Return all AMX whose name is equal to 'nameValue'.
 java.lang.String[] queryJ2EETypeNames(java.lang.String j2eeTypeValue)
          Calls queryJ2EETypeSet( j2eeTypeValue ), then creates an array consisting of the names of each of the resulting objects.
 java.util.Set queryJ2EETypeObjectNameSet(java.lang.String j2eeTypeValue)
           
 java.util.Set queryJ2EETypeSet(java.lang.String j2eeTypeValue)
          Return all AMX whose j2eeType is equal to 'j2eeTypeValue.
 java.util.Set queryJ2EETypesObjectNameSet(java.util.Set j2eeTypes)
           
 java.util.Set queryJ2EETypesSet(java.util.Set j2eeTypes)
          Return all AMX whose j2eeType is equal to any specified in 'j2eeTypes'.
 java.util.Set queryPatternObjectNameSet(ObjectName pattern)
           
 java.util.Set queryPatternObjectNameSet(java.lang.String domain, java.lang.String props)
           
 java.util.Set queryPatternSet(ObjectName pattern)
          Return all AMX whose ObjectName matches the supplied ObjectName pattern, as defined by the JMX specification.
 java.util.Set queryPatternSet(java.lang.String domain, java.lang.String props)
          Makes an ObjectName pattern, then calls queryPatternSet( pat )
 java.util.Set queryPropsObjectNameSet(java.lang.String props)
           
 java.util.Set queryPropsSet(java.lang.String props)
          Return all objects that match the specified properties in the JMX domain governed by this QueryMgr.
 AMX querySingletonJ2EEType(java.lang.String j2eeTypeValue)
          Calls getJ2EETypeSet( j2eeTypeValue ) and extracts the single result.
 java.util.Set queryWildObjectNameSet(java.lang.String[] wildKeys, java.lang.String[] wildValues)
           
 java.util.Set queryWildSet(java.lang.String[] wildKeys, java.lang.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
 
Methods inherited from interface com.sun.appserv.management.base.AMXMBeanLogging
getMBeanEmitLogNotifications, getMBeanLoggerName, getMBeanLogLevel, setMBeanEmitLogNotifications, setMBeanLogLevel
 
Methods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Field Detail

J2EE_TYPE

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

See Also:
Constant Field Values
Method Detail

querySingletonJ2EEType

public AMX querySingletonJ2EEType(java.lang.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

public java.util.Set queryJ2EETypesSet(java.util.Set 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

public java.util.Set queryJ2EETypesObjectNameSet(java.util.Set j2eeTypes)
See Also:
queryJ2EETypesSet(java.util.Set)

queryJ2EETypeSet

public java.util.Set queryJ2EETypeSet(java.lang.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

public java.util.Set queryJ2EETypeObjectNameSet(java.lang.String j2eeTypeValue)
Returns:
Set of ObjectName

queryJ2EENameSet

public java.util.Set queryJ2EENameSet(java.lang.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

public java.util.Set queryJ2EENameObjectNameSet(java.lang.String nameValue)
Returns:
Set of ObjectName

queryJ2EETypeNames

public java.lang.String[] queryJ2EETypeNames(java.lang.String j2eeTypeValue)
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:
j2eeTypeValue - the value for the j2eeType property
Returns:
array of names

queryPatternSet

public java.util.Set 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

public java.util.Set queryPatternObjectNameSet(ObjectName pattern)
Returns:
Set of ObjectName

queryPatternSet

public java.util.Set queryPatternSet(java.lang.String domain,
                                     java.lang.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

public java.util.Set queryPatternObjectNameSet(java.lang.String domain,
                                               java.lang.String props)
Returns:
Set of ObjectName

queryPropsSet

public java.util.Set queryPropsSet(java.lang.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

public java.util.Set queryPropsObjectNameSet(java.lang.String props)
Returns:
Set of ObjectName

queryWildSet

public java.util.Set queryWildSet(java.lang.String[] wildKeys,
                                  java.lang.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.

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

public java.util.Set queryWildObjectNameSet(java.lang.String[] wildKeys,
                                            java.lang.String[] wildValues)
Returns:
Set of ObjectName

queryInterfaceSet

public java.util.Set queryInterfaceSet(java.lang.String interfaceName,
                                       java.util.Set candidateObjectNames)
                                throws java.lang.ClassNotFoundException
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
Throws:
java.lang.ClassNotFoundException

queryInterfaceObjectNameSet

public java.util.Set queryInterfaceObjectNameSet(java.lang.String interfaceName,
                                                 java.util.Set candidateObjectNames)
                                          throws java.lang.ClassNotFoundException
Returns:
Set of ObjectName
Throws:
java.lang.ClassNotFoundException

queryAllSet

public java.util.Set queryAllSet()
Returns:
Set of all AMX
See Also:
queryAllObjectNameSet()

queryAllObjectNameSet

public java.util.Set queryAllObjectNameSet()
Returns:
Set of ObjectName of all AMX
See Also:
queryAllSet()

J2EE1.4 SDK

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.