|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.management.MBeanServerInvocationHandler
org.glassfish.admin.amx.util.jmx.MBeanProxyHandler
org.glassfish.admin.amx.core.proxy.AMXProxyHandler
@Taxonomy(stability=PRIVATE) public final class AMXProxyHandler
Extends MBeanProxyHandler by also supporting the functionality required of an AMX.
| Field Summary | |
|---|---|
static String |
ADD_NOTIFICATION_LISTENER
|
static String |
REMOVE_NOTIFICATION_LISTENER
|
| Fields inherited from class org.glassfish.admin.amx.util.jmx.MBeanProxyHandler |
|---|
GET_PREFIX_LENGTH, IS, IS_PREFIX_LENGTH, mDebug, mInitialMBeanInfo, SET |
| Constructor Summary | |
|---|---|
protected |
AMXProxyHandler(MBeanServerConnection conn,
ObjectName objectName,
MBeanInfo mbeanInfo)
Create a new AMX proxy. |
| Method Summary | ||
|---|---|---|
protected Object |
_invoke(Object myProxy,
Method method,
Object[] argsIn)
|
|
protected void |
addNotificationListener(Object[] args)
|
|
|
as(Class<T> intf)
convert to specified class. |
|
MBeanAttributeInfo |
attributeInfo(String attrName)
Get MBeanOperationInfo for specified attribute name. |
|
Set<String> |
attributeNames()
Get all available Attributes names, no trip to server needed. |
|
Map<String,Object> |
attributesMap()
Get a Map keyed by Attribute name of all Attribute values. |
|
Map<String,Object> |
attributesMap(Set<String> attrNames)
Get a Map keyed by Attribute name of the specified Attribute values. |
|
|
child(Class<T> intf)
Get a singleton child. |
|
AMXProxy |
child(String type)
Get a singleton child of the specified type. |
|
|
child(String type,
Class<T> intf)
|
|
|
child(String type,
String name,
Class<T> intf)
|
|
|
childrenMap(Class<T> intf)
Get all children of the same type. |
|
Map<String,AMXProxy> |
childrenMap(String type)
Get all children of a specified type, keyed by the name as found in the ObjectName. |
|
|
childrenMap(String type,
Class<T> intf)
|
|
Map<String,Map<String,AMXProxy>> |
childrenMaps()
Get Maps keyed by type, with a Map keyed by name. |
|
Set<AMXProxy> |
childrenSet()
Returns an array of children, including an empty array if there are none, but children are possible. |
|
Set<AMXProxy> |
childrenSet(ObjectName[] objectNames)
|
|
|
childrenSet(String type,
Class<T> intf)
|
|
Set<String> |
childrenTypes(ObjectName[] objectNames)
|
|
Descriptor |
descriptor()
MBeanInfo descriptor |
|
DomainRoot |
domainRootProxy()
|
|
Extra |
extra()
additional capabilities, including direct JMX access |
|
Class<? extends AMXProxy> |
genericInterface()
From Descriptor: get the generic interface for this MBean eg AMXProxy or AMXConfigProxy or (possibly) something else. |
|
String |
genericInterfaceName()
|
|
static String |
genericInterfaceName(MBeanInfo info)
|
|
MBeanAttributeInfo |
getAttributeInfo(String name)
|
|
ObjectName[] |
getChildren()
If no children are possible (a leaf node), an AttributeNotFoundException should be thrown. |
|
static
|
getDescriptorField(MBeanInfo info,
String name,
T defaultValue)
|
|
protected
|
getDescriptorField(String name,
T defaultValue)
|
|
String |
getName()
the unencoded name, which could differ from the value of the 'name' property in the ObjectName |
|
ObjectName |
getParent()
Return the ObjectName of the parent. |
|
protected AMXProxy |
getProxy(ObjectName objectName)
|
|
protected
|
getProxy(ObjectName objectName,
Class<T> intf)
|
|
boolean |
globalSingleton()
From Descriptor: true if this MBean is a global singleton (1 instance within entire domain) |
|
static boolean |
globalSingleton(MBeanInfo info)
|
|
String |
group()
From Descriptor: return the group value |
|
String |
interfaceName()
From Descriptor: get the Java classname of the interface for this MBean. |
|
static String |
interfaceName(MBeanInfo info)
|
|
Object |
invoke(Object myProxy,
Method method,
Object[] args)
Invoke the specified method. |
|
Object |
invokeOp(String operationName)
Invoke an operation by name, no arguments. |
|
Object |
invokeOp(String operationName,
Object[] args,
String[] signature)
Invoke an operation by name, JMX style params and signature. |
|
protected static boolean |
isSingleProxyGetter(Method method,
int argCount)
Return true if the method is one that is requesting a single AMX object. |
|
String |
java()
Return a Java interface representing this MBean, suitable for display or compilation |
|
MBeanInfo |
mbeanInfo()
|
|
MBeanServerConnection |
mbeanServerConnection()
Get the MBeanServerConnection. |
|
String |
nameProp()
Value of the name property of the ObjectName. |
|
ObjectName |
objectName()
The ObjectName of this MBean. |
|
MBeanOperationInfo |
operationInfo(String operationName)
Get MBeanOperationInfo for specified operation. |
|
AMXProxy |
parent()
MBean MUST return an ObjectName. |
|
String |
parentPath()
The value of the PARENT_PATH_KEY property in the ObjectName |
|
String |
path()
Get this MBean's pathname. |
|
ProxyFactory |
proxyFactory()
|
|
protected void |
removeNotificationListener(Object[] args)
|
|
boolean |
singleton()
From Descriptor: true if this MBean is a singleton (1 instance within its parent scope) |
|
static boolean |
singleton(MBeanInfo info)
|
|
String[] |
subTypes()
From Descriptor: Get the *potential* sub types this MBean expects to have |
|
boolean |
supportsAdoption()
From Descriptor: return true if new children are allowed by external subsystems |
|
String |
type()
The value of the TYPE_KEY property in the ObjectName |
|
static AMXProxyHandler |
unwrap(AMXProxy proxy)
|
|
boolean |
valid()
A proxy can become invalid if its corresponding MBean is unregistered, the connection is lost, etc. |
|
| Methods inherited from class org.glassfish.admin.amx.util.jmx.MBeanProxyHandler |
|---|
connectionBad, debug, debug, debugMethod, debugMethod, equals, extractAttributeNameFromMethod, getAttribute, getAttributeNoThrow, getAttributes, getDebug, getMBeanInfo, getProxyLogger, hashCode, invoke, isInvariantMBeanInfo, isLocal, isValid, postGetAttributeHook, postGetAttributesHook, postSetAttributeHook, postSetAttributesHook, setAttribute, setAttributes, targetUnregistered |
| Methods inherited from class javax.management.MBeanServerInvocationHandler |
|---|
getMBeanServerConnection, getObjectName, isMXBean, newProxyInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.glassfish.admin.amx.core.StdAttributesAccess |
|---|
getAttribute, getAttributes, invoke, setAttribute, setAttributes |
| Methods inherited from interface org.glassfish.admin.amx.core.MetaGetters |
|---|
isInvariantMBeanInfo |
| Field Detail |
|---|
public static final String ADD_NOTIFICATION_LISTENER
public static final String REMOVE_NOTIFICATION_LISTENER
| Constructor Detail |
|---|
protected AMXProxyHandler(MBeanServerConnection conn,
ObjectName objectName,
MBeanInfo mbeanInfo)
throws IOException
IOException| Method Detail |
|---|
public <T extends AMXProxy> T as(Class<T> intf)
as in interface AMXProxypublic Extra extra()
AMXProxy
extra in interface AMXProxypublic static AMXProxyHandler unwrap(AMXProxy proxy)
public final DomainRoot domainRootProxy()
protected <T extends AMXProxy> T getProxy(ObjectName objectName,
Class<T> intf)
protected AMXProxy getProxy(ObjectName objectName)
protected static boolean isSingleProxyGetter(Method method,
int argCount)
public final Object invoke(Object myProxy,
Method method,
Object[] args)
throws Throwable
MBeanProxyHandlerFor anything else, the behavior of MBeanServerInvocationHandler is used.
invoke in interface InvocationHandlerinvoke in class MBeanProxyHandlerThrowablepublic Object invokeOp(String operationName)
AMXProxy
invokeOp in interface AMXProxy
public Object invokeOp(String operationName,
Object[] args,
String[] signature)
AMXProxy
invokeOp in interface AMXProxy
protected Object _invoke(Object myProxy,
Method method,
Object[] argsIn)
throws Throwable
Throwable
protected void addNotificationListener(Object[] args)
throws IOException,
InstanceNotFoundException
IOException
InstanceNotFoundException
protected void removeNotificationListener(Object[] args)
throws IOException,
InstanceNotFoundException,
ListenerNotFoundException
IOException
InstanceNotFoundException
ListenerNotFoundExceptionpublic static String interfaceName(MBeanInfo info)
public String interfaceName()
MetaGetters
interfaceName in interface MetaGettersinterfaceName in class MBeanProxyHandlerpublic static String genericInterfaceName(MBeanInfo info)
public String genericInterfaceName()
public Class<? extends AMXProxy> genericInterface()
MetaGetters
genericInterface in interface MetaGetterspublic boolean valid()
AMXProxy
valid in interface AMXProxypublic ProxyFactory proxyFactory()
proxyFactory in interface ExtraProxyFactory that created this proxy.public MBeanServerConnection mbeanServerConnection()
Extra
mbeanServerConnection in interface Extrapublic ObjectName objectName()
AMXProxy
objectName in interface AMXProxypublic String nameProp()
AMXProxy
nameProp in interface AMXProxypublic String parentPath()
AMXProxyPARENT_PATH_KEY property in the ObjectName
parentPath in interface AMXProxypublic String type()
AMXProxyTYPE_KEY property in the ObjectName
type in interface AMXProxypublic String getName()
AMX_SPI
getName in interface AMX_SPIpublic ObjectName getParent()
AMX_SPI
getParent in interface AMX_SPIpublic AMXProxy parent()
AMXProxy
parent in interface AMXProxypublic String path()
AMXProxypath
on AMXProxy.parent()
path in interface AMXProxypublic ObjectName[] getChildren()
AMX_SPI
getChildren in interface AMX_SPIpublic Set<AMXProxy> childrenSet()
childrenSet in interface AMXProxypublic Set<AMXProxy> childrenSet(ObjectName[] objectNames)
public Set<String> childrenTypes(ObjectName[] objectNames)
public Map<String,AMXProxy> childrenMap(String type)
AMXProxy
childrenMap in interface AMXProxypublic <T extends AMXProxy> Map<String,T> childrenMap(Class<T> intf)
AMXProxy
childrenMap in interface AMXProxyintf - the proxy interface, type is deduced from it
public <T extends AMXProxy> Map<String,T> childrenMap(String type,
Class<T> intf)
public Map<String,Map<String,AMXProxy>> childrenMaps()
AMXProxy
childrenMaps in interface AMXProxy
public <T extends AMXProxy> Set<T> childrenSet(String type,
Class<T> intf)
public AMXProxy child(String type)
AMXProxy
child in interface AMXProxypublic <T extends AMXProxy> T child(Class<T> intf)
AMXProxyUtil#deduceType.
child in interface AMXProxy
public <T extends AMXProxy> T child(String type,
Class<T> intf)
public <T extends AMXProxy> T child(String type,
String name,
Class<T> intf)
public final MBeanInfo mbeanInfo()
mbeanInfo in interface MetaGetterspublic Map<String,Object> attributesMap(Set<String> attrNames)
AMXProxy
attributesMap in interface AMXProxypublic Map<String,Object> attributesMap()
AMXProxy
attributesMap in interface AMXProxypublic MBeanAttributeInfo getAttributeInfo(String name)
public Set<String> attributeNames()
AMXProxy
attributeNames in interface AMXProxy
public static <T> T getDescriptorField(MBeanInfo info,
String name,
T defaultValue)
public static boolean singleton(MBeanInfo info)
public static boolean globalSingleton(MBeanInfo info)
protected <T> T getDescriptorField(String name,
T defaultValue)
public boolean singleton()
MetaGetters
singleton in interface MetaGetterspublic boolean globalSingleton()
MetaGetters
globalSingleton in interface MetaGetterspublic String group()
MetaGetters
group in interface MetaGetterspublic boolean supportsAdoption()
MetaGetters
supportsAdoption in interface MetaGetterspublic String[] subTypes()
MetaGetters
subTypes in interface MetaGetterspublic String java()
AMXProxy
java in interface AMXProxyjava in interface Extrapublic Descriptor descriptor()
MetaGetters
descriptor in interface MetaGetterspublic MBeanAttributeInfo attributeInfo(String attrName)
MetaGetters
attributeInfo in interface MetaGetterspublic MBeanOperationInfo operationInfo(String operationName)
MetaGetters
operationInfo in interface MetaGetters
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.
Generated on 12-March-2010 04:35