|
J2EE1.4 SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.appserv.management.base.Util
Utility routines pertinent to the MBean API.
Method Summary | |
static java.lang.String |
concatenateProps(java.lang.String props1,
java.lang.String props2)
|
static java.lang.String |
concatenateProps(java.lang.String props1,
java.lang.String props2,
java.lang.String props3)
|
static java.util.Map |
createNameMap(java.util.Set amxs)
Create a Map keyed by the value of the AMX.NAME_KEY with value the AMX item. |
static java.util.Map |
createObjectNameMap(java.util.Set objectNames)
Create a Map keyed by the value of the AMX.NAME_KEY with value the ObjectName. |
static Extra |
getExtra(AMX proxy)
Get extra information about this AMX .
|
static java.lang.String |
getFullTypeProps(ObjectName objectName,
java.lang.String fullType)
Get properties corresponding to the FullType of this ObjectName. |
static java.lang.String |
getJ2EEType(ObjectName objectName)
|
static java.lang.String |
getName(ObjectName objectName)
Get the value of the AMX.NAME_KEY property within the ObjectName or AMX.NO_NAME if not present. |
static java.lang.String[] |
getNamesArray(java.util.Set objectNames)
Extract the names from all ObjectNames. |
static java.util.Set |
getNamesSet(java.util.Set objectNames)
Extract the names from all ObjectNames. |
static ObjectName |
getObjectName(AMX proxy)
Get the ObjectName targeted by this AMX . |
static ObjectName |
getObjectName(java.util.Map candidates,
java.lang.String name)
Get an ObjectName from a Map of AMX or Map of ObjectName where the values are keyed by name. |
static java.util.Set |
getPatternKeys(java.lang.String fullType)
Get all keys required for an ObjectName pattern which uniquely identifies the MBean. |
static java.lang.String |
getSelfProp(ObjectName objectName)
Extract the j2eeType and name properties and return it as a single property j2eeType=name |
static java.lang.String[] |
getTypeArray(java.lang.String fullType)
Get the FullType as a String[], last element being the j2eeType. |
static java.lang.String |
makeJ2EETypeProp(java.lang.String value)
Make an ObjectName property of the form j2eeType=value. |
static java.lang.String |
makeNameProp(java.lang.String value)
Make an ObjectName property of the form name=value. |
static java.lang.String |
makeProp(java.lang.String name,
java.lang.String value)
Make an ObjectName property of the form name=value. |
static java.lang.String |
makeRequiredProps(java.lang.String j2eeType,
java.lang.String name)
|
static ObjectName |
newObjectName(java.lang.String name)
Create a new ObjectName, caller is guaranteeing that the name is well-formed (a RuntimeException will be thrown if not). |
static ObjectName |
newObjectName(java.lang.String domain,
java.lang.String props)
Build an ObjectName. |
static ObjectName |
newObjectNamePattern(ObjectName objectName)
Build an ObjectName pattern. |
static ObjectName |
newObjectNamePattern(java.lang.String domain,
java.lang.String props)
Build an ObjectName pattern. |
static ObjectName[] |
toObjectNames(AMX[] amx)
|
static java.util.Map |
toObjectNames(java.util.Map amxMap)
|
static java.util.Set |
toObjectNames(java.util.Set amxs)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ObjectName newObjectName(java.lang.String name)
name
- public static ObjectName newObjectName(java.lang.String domain, java.lang.String props)
domain
- the JMX domainprops
- properties of the ObjectNamepublic static ObjectName newObjectNamePattern(java.lang.String domain, java.lang.String props)
domain
- the JMX domainprops
- properties of the ObjectNamepublic static ObjectName newObjectNamePattern(ObjectName objectName)
objectName
- public static java.lang.String makeProp(java.lang.String name, java.lang.String value)
name
- value
- public static java.lang.String makeJ2EETypeProp(java.lang.String value)
value
- public static java.lang.String makeNameProp(java.lang.String value)
value
- public static java.lang.String makeRequiredProps(java.lang.String j2eeType, java.lang.String name)
j2eeType
- name
- public static java.lang.String getSelfProp(ObjectName objectName)
objectName
- public static java.lang.String getFullTypeProps(ObjectName objectName, java.lang.String fullType)
objectName
- fullType
-
public static java.lang.String getName(ObjectName objectName)
public static java.lang.String getJ2EEType(ObjectName objectName)
public static java.lang.String[] getTypeArray(java.lang.String fullType)
fullType
- as returned from AMX.getFullType()
public static java.util.Set getPatternKeys(java.lang.String fullType)
public static java.lang.String concatenateProps(java.lang.String props1, java.lang.String props2)
public static java.lang.String concatenateProps(java.lang.String props1, java.lang.String props2, java.lang.String props3)
public static java.util.Set toObjectNames(java.util.Set amxs)
public static java.util.Map toObjectNames(java.util.Map amxMap)
public static ObjectName[] toObjectNames(AMX[] amx)
public static java.util.Set getNamesSet(java.util.Set objectNames)
AMX
). Note that if two or more ObjectNames
share the same name, the resulting Set will be of smaller size() than
the original.
public static java.lang.String[] getNamesArray(java.util.Set objectNames)
public static final java.util.Map createObjectNameMap(java.util.Set objectNames)
objectNames
- Set of ObjectNamepublic static final java.util.Map createNameMap(java.util.Set amxs)
amxs
- Set of AMXpublic static Extra getExtra(AMX proxy)
AMX
.
'Extra' is not an MBean Attribute; it exists only in the AMX
.
proxy
- an AMXpublic static ObjectName getObjectName(AMX proxy)
AMX
.
proxy
- an AMXpublic static ObjectName getObjectName(java.util.Map candidates, java.lang.String name)
candidates
- name
-
java.lang.IllegalArgumentException
- if not found
|
J2EE1.4 SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2003 Sun Microsystems, Inc. All rights reserved.