FileDocCategorySizeDatePackage
QueryMgr.javaAPI DocGlassfish v2 API8510Fri May 04 22:30:30 BST 2007com.sun.appserv.management.base

QueryMgr

public interface QueryMgr implements Utility, Singleton, com.sun.appserv.management.base.AMX
Supports various types of queries to find s based on various Attributes.

Fields Summary
public static final String
J2EE_TYPE
The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType}.
Constructors Summary
Methods Summary
public java.util.SetqueryAllObjectNameSet()

return
Set of ObjectName of all AMX
see
#queryAllSet

public java.util.SetqueryAllSet()

return
Set of all AMX
see
#queryAllObjectNameSet

public java.util.SetqueryInterfaceObjectNameSet(java.lang.String interfaceName, java.util.Set candidateObjectNames)

return
Set of ObjectName

public java.util.SetqueryInterfaceSet(java.lang.String interfaceName, java.util.Set candidateObjectNames)
Return all {@link 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.

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

public java.util.SetqueryJ2EENameObjectNameSet(java.lang.String nameValue)

return
Set of ObjectName

public java.util.SetqueryJ2EENameSet(java.lang.String nameValue)
Return all {@link AMX} whose name is equal to 'nameValue'.

param
nameValue the value for the j2eeType property
return
Set of AMX or empty Set if none

public java.util.SetqueryJ2EETypeNameObjectNameSet(java.lang.String j2eeType, java.lang.String name)

return
Set containing all items that have the matching j2eeType and name

public java.util.SetqueryJ2EETypeNameSet(java.lang.String j2eeType, java.lang.String name)

return
Set containing all items that have the matching j2eeType and name

public java.lang.String[]queryJ2EETypeNames(java.lang.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.

param
j2eeType the value for the j2eeType property
return
array of names

public java.util.SetqueryJ2EETypeObjectNameSet(java.lang.String j2eeTypeValue)

return
Set of ObjectName

public java.util.SetqueryJ2EETypeSet(java.lang.String j2eeTypeValue)
Return all {@link AMX} whose j2eeType is equal to 'j2eeTypeValue. Legal values include those defined in {@link com.sun.appserv.management.j2ee.J2EETypes} and those defined in {@link com.sun.appserv.management.base.XTypes}

param
j2eeTypeValue the value for the j2eeType property
return
Set of AMX or empty Set if none

public java.util.SetqueryJ2EETypesObjectNameSet(java.util.Set j2eeTypes)

see
#queryJ2EETypesSet

public java.util.SetqueryJ2EETypesSet(java.util.Set j2eeTypes)
Return all {@link AMX} whose j2eeType is equal to any specified in 'j2eeTypes'.

param
j2eeTypes Set of String (j2eeType values).
return
Set of AMX or empty Set if none

public java.util.SetqueryPatternObjectNameSet(javax.management.ObjectName pattern)

return
Set of ObjectName

public java.util.SetqueryPatternObjectNameSet(java.lang.String domain, java.lang.String props)

return
Set of ObjectName

public java.util.SetqueryPatternSet(javax.management.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.

param
pattern an ObjectName containing a pattern as defined by JMX
return
Set of AMX or empty Set if none

public java.util.SetqueryPatternSet(java.lang.String domain, java.lang.String props)
Makes an ObjectName pattern, then calls queryPatternSet( pat )

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

public java.util.SetqueryPropsObjectNameSet(java.lang.String props)

return
Set of ObjectName

public java.util.SetqueryPropsSet(java.lang.String props)
Return all objects that match the specified properties in the JMX domain governed by this QueryMgr.

param
props a String containing one or more name/value properties

public TquerySingletonJ2EEType(java.lang.String j2eeTypeValue)
Calls getJ2EETypeSet( j2eeTypeValue ) and extracts the single result. Throws an exception if more than one object is found.

param
j2eeTypeValue the value for the j2eeType property
return
ObjectName or null if not found
throws
exception if not found

public java.util.SetqueryWildObjectNameSet(java.lang.String[] wildKeys, java.lang.String[] wildValues)

return
Set of ObjectName

public java.util.SetqueryWildSet(java.lang.String[] wildKeys, java.lang.String[] wildValues)
Return all {@link 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(...);

param
wildKeys one or more name expressions, null means all
param
wildValues one or more value expressions, null means all
return
Set of AMX or empty Set if none