Class AMXProxyHandler
- java.lang.Object
-
- javax.management.MBeanServerInvocationHandler
-
- org.glassfish.admin.amx.util.jmx.MBeanProxyHandler
-
- org.glassfish.admin.amx.core.proxy.AMXProxyHandler
-
- All Implemented Interfaces:
InvocationHandler
,AMX_SPI
,AMXProxy
,Extra
,MetaGetters
,StdAttributesAccess
@Deprecated @Taxonomy(stability=PRIVATE) public final class AMXProxyHandler extends MBeanProxyHandler implements AMXProxy, Extra
Deprecated.Extends MBeanProxyHandler by also supporting the functionality required of an AMX.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ADD_NOTIFICATION_LISTENER
Deprecated.static String
REMOVE_NOTIFICATION_LISTENER
Deprecated.-
Fields inherited from class org.glassfish.admin.amx.util.jmx.MBeanProxyHandler
GET_PREFIX_LENGTH, IS, IS_PREFIX_LENGTH, mDebug, mInitialMBeanInfo, SET
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AMXProxyHandler(MBeanServerConnection conn, ObjectName objectName, MBeanInfo mbeanInfo)
Deprecated.Create a new AMX proxy.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected Object
_invoke(Object myProxy, Method method, Object[] argsIn)
Deprecated.protected void
addNotificationListener(Object[] args)
Deprecated.<T extends AMXProxy>
Tas(Class<T> intf)
Deprecated.convert to specified class.MBeanAttributeInfo
attributeInfo(String attrName)
Deprecated.Get MBeanOperationInfo for specified attribute name.Set<String>
attributeNames()
Deprecated.Get all available Attributes names, no trip to server needed.Map<String,Object>
attributesMap()
Deprecated.Get a Map keyed by Attribute name of all Attribute values.Map<String,Object>
attributesMap(Set<String> attrNames)
Deprecated.Get a Map keyed by Attribute name of the specified Attribute values.<T extends AMXProxy>
Tchild(Class<T> intf)
Deprecated.Get a singleton child.AMXProxy
child(String type)
Deprecated.Get a singleton child of the specified type.<T extends AMXProxy>
Tchild(String type, Class<T> intf)
Deprecated.<T extends AMXProxy>
Tchild(String type, String name, Class<T> intf)
Deprecated.<T extends AMXProxy>
Map<String,T>childrenMap(Class<T> intf)
Deprecated.Get all children of the same type.Map<String,AMXProxy>
childrenMap(String type)
Deprecated.Get all children of a specified type, keyed by the name as found in the ObjectName.<T extends AMXProxy>
Map<String,T>childrenMap(String type, Class<T> intf)
Deprecated.Map<String,Map<String,AMXProxy>>
childrenMaps()
Deprecated.Get Maps keyed by type, with a Map keyed by name.Set<AMXProxy>
childrenSet()
Deprecated.Returns an array of children, including an empty array if there are none, but children are possible.<T extends AMXProxy>
Set<T>childrenSet(String type, Class<T> intf)
Deprecated.Set<AMXProxy>
childrenSet(ObjectName[] objectNames)
Deprecated.Set<String>
childrenTypes(ObjectName[] objectNames)
Deprecated.Descriptor
descriptor()
Deprecated.MBeanInfo descriptorDomainRoot
domainRootProxy()
Deprecated.boolean
equals(Object rhs)
Deprecated.Extra
extra()
Deprecated.additional capabilities, including direct JMX accessClass<? extends AMXProxy>
genericInterface()
Deprecated.From Descriptor: get the generic interface for this MBean eg AMXProxy or AMXConfigProxy or (possibly) something else.String
genericInterfaceName()
Deprecated.static String
genericInterfaceName(MBeanInfo info)
Deprecated.MBeanAttributeInfo
getAttributeInfo(String name)
Deprecated.ObjectName[]
getChildren()
Deprecated.If no children are possible (a leaf node), an AttributeNotFoundException should be thrown.protected <T> T
getDescriptorField(String name, T defaultValue)
Deprecated.static <T> T
getDescriptorField(MBeanInfo info, String name, T defaultValue)
Deprecated.String
getName()
Deprecated.the unencoded name, which could differ from the value of the 'name' property in the ObjectNameObjectName
getParent()
Deprecated.Return the ObjectName of the parent.protected AMXProxy
getProxy(ObjectName objectName)
Deprecated.protected <T extends AMXProxy>
TgetProxy(ObjectName objectName, Class<T> intf)
Deprecated.boolean
globalSingleton()
Deprecated.From Descriptor: true if this MBean is a global singleton (1 instance within entire domain)static boolean
globalSingleton(MBeanInfo info)
Deprecated.String
group()
Deprecated.From Descriptor: return the group valueint
hashCode()
Deprecated.String
interfaceName()
Deprecated.From Descriptor: get the Java classname of the interface for this MBean.static String
interfaceName(MBeanInfo info)
Deprecated.Object
invoke(Object myProxy, Method method, Object[] args)
Deprecated.Invoke the specified method.Object
invokeOp(String operationName)
Deprecated.Invoke an operation by name, no arguments.Object
invokeOp(String operationName, Object[] args, String[] signature)
Deprecated.Invoke an operation by name, JMX style params and signature.protected static boolean
isSingleProxyGetter(Method method, int argCount)
Deprecated.Return true if the method is one that is requesting a single AMX object.String
java()
Deprecated.Return a Java interface representing this MBean, suitable for display or compilationMBeanInfo
mbeanInfo()
Deprecated.MBeanServerConnection
mbeanServerConnection()
Deprecated.Get the MBeanServerConnection.String
nameProp()
Deprecated.Value of the name property of the ObjectName.ObjectName
objectName()
Deprecated.The ObjectName of this MBean.MBeanOperationInfo
operationInfo(String operationName)
Deprecated.Get MBeanOperationInfo for specified operation.AMXProxy
parent()
Deprecated.MBean MUST return an ObjectName.String
parentPath()
Deprecated.The value of thePARENT_PATH_KEY
property in the ObjectNameString
path()
Deprecated.Get this MBean's pathname.ProxyFactory
proxyFactory()
Deprecated.protected void
removeNotificationListener(Object[] args)
Deprecated.boolean
singleton()
Deprecated.From Descriptor: true if this MBean is a singleton (1 instance within its parent scope)static boolean
singleton(MBeanInfo info)
Deprecated.String[]
subTypes()
Deprecated.From Descriptor: Get the *potential* sub types this MBean expects to haveboolean
supportsAdoption()
Deprecated.From Descriptor: return true if new children are allowed by external subsystemsString
type()
Deprecated.The value of theTYPE_KEY
property in the ObjectNamestatic AMXProxyHandler
unwrap(AMXProxy proxy)
Deprecated.boolean
valid()
Deprecated.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, extractAttributeNameFromMethod, getAttribute, getAttributeNoThrow, getAttributes, getDebug, getMBeanInfo, getProxyLogger, 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.MetaGetters
isInvariantMBeanInfo
-
Methods inherited from interface org.glassfish.admin.amx.core.StdAttributesAccess
getAttribute, getAttributes, invoke, setAttribute, setAttributes
-
-
-
-
Field Detail
-
ADD_NOTIFICATION_LISTENER
public static final String ADD_NOTIFICATION_LISTENER
Deprecated.- See Also:
- Constant Field Values
-
REMOVE_NOTIFICATION_LISTENER
public static final String REMOVE_NOTIFICATION_LISTENER
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AMXProxyHandler
protected AMXProxyHandler(MBeanServerConnection conn, ObjectName objectName, MBeanInfo mbeanInfo) throws IOException
Deprecated.Create a new AMX proxy.- Throws:
IOException
-
-
Method Detail
-
extra
public Extra extra()
Deprecated.Description copied from interface:AMXProxy
additional capabilities, including direct JMX access
-
unwrap
public static AMXProxyHandler unwrap(AMXProxy proxy)
Deprecated.
-
domainRootProxy
public final DomainRoot domainRootProxy()
Deprecated.
-
getProxy
protected <T extends AMXProxy> T getProxy(ObjectName objectName, Class<T> intf)
Deprecated.
-
getProxy
protected AMXProxy getProxy(ObjectName objectName)
Deprecated.
-
isSingleProxyGetter
protected static boolean isSingleProxyGetter(Method method, int argCount)
Deprecated.Return true if the method is one that is requesting a single AMX object. Such methods are client-side methods and do not operate on the target MBean.
-
invoke
public final Object invoke(Object myProxy, Method method, Object[] args) throws Throwable
Deprecated.Description copied from class:MBeanProxyHandler
Invoke the specified method. This implementation supports additional functionality over the JMX MBeanServerInvocationHandler: (1) It supports mapped Attribute names (ones that are not legal Java names) (2) it supports XAttributesAccess, which otherwise does not work correctlyFor anything else, the behavior of MBeanServerInvocationHandler is used.
- Specified by:
invoke
in interfaceInvocationHandler
- Overrides:
invoke
in classMBeanProxyHandler
- Throws:
Throwable
-
invokeOp
public Object invokeOp(String operationName)
Deprecated.Description copied from interface:AMXProxy
Invoke an operation by name, no arguments.
-
invokeOp
public Object invokeOp(String operationName, Object[] args, String[] signature)
Deprecated.Description copied from interface:AMXProxy
Invoke an operation by name, JMX style params and signature.
-
_invoke
protected Object _invoke(Object myProxy, Method method, Object[] argsIn) throws Throwable
Deprecated.- Throws:
Throwable
-
addNotificationListener
protected void addNotificationListener(Object[] args) throws IOException, InstanceNotFoundException
Deprecated.- Throws:
IOException
InstanceNotFoundException
-
removeNotificationListener
protected void removeNotificationListener(Object[] args) throws IOException, InstanceNotFoundException, ListenerNotFoundException
Deprecated.
-
interfaceName
public String interfaceName()
Deprecated.Description copied from interface:MetaGetters
From Descriptor: get the Java classname of the interface for this MBean. If it has not been specified, a default generic interface is returned eg 'AMX'. There is no guarantee that the interface exists on the client.- Specified by:
interfaceName
in interfaceMetaGetters
- Overrides:
interfaceName
in classMBeanProxyHandler
-
genericInterfaceName
public String genericInterfaceName()
Deprecated.
-
genericInterface
public Class<? extends AMXProxy> genericInterface()
Deprecated.Description copied from interface:MetaGetters
From Descriptor: get the generic interface for this MBean eg AMXProxy or AMXConfigProxy or (possibly) something else. The generic interface is always part of amx-core.- Specified by:
genericInterface
in interfaceMetaGetters
-
valid
public boolean valid()
Deprecated.Description copied from interface:AMXProxy
A proxy can become invalid if its corresponding MBean is unregistered, the connection is lost, etc. If currently marked as valid, a trip to the server is made to verify validity.
-
proxyFactory
public ProxyFactory proxyFactory()
Deprecated.- Specified by:
proxyFactory
in interfaceExtra
- Returns:
- the
ProxyFactory
that created this proxy.
-
mbeanServerConnection
public MBeanServerConnection mbeanServerConnection()
Deprecated.Description copied from interface:Extra
Get the MBeanServerConnection.- Specified by:
mbeanServerConnection
in interfaceExtra
-
objectName
public ObjectName objectName()
Deprecated.Description copied from interface:AMXProxy
The ObjectName of this MBean.- Specified by:
objectName
in interfaceAMXProxy
-
nameProp
public String nameProp()
Deprecated.Description copied from interface:AMXProxy
Value of the name property of the ObjectName. Could differ from getName(), which returns the internal name, which might not be legal in an ObjectName, or could have changed.
-
parentPath
public String parentPath()
Deprecated.Description copied from interface:AMXProxy
The value of thePARENT_PATH_KEY
property in the ObjectName- Specified by:
parentPath
in interfaceAMXProxy
-
type
public String type()
Deprecated.Description copied from interface:AMXProxy
The value of theTYPE_KEY
property in the ObjectName
-
getName
public String getName()
Deprecated.Description copied from interface:AMX_SPI
the unencoded name, which could differ from the value of the 'name' property in the ObjectName
-
getParent
public ObjectName getParent()
Deprecated.Description copied from interface:AMX_SPI
Return the ObjectName of the parent. Must not be null (except for DomainRoot)
-
parent
public AMXProxy parent()
Deprecated.Description copied from interface:AMXProxy
MBean MUST return an ObjectName. May be null for DomainRoot only.
-
path
public String path()
Deprecated.Description copied from interface:AMXProxy
Get this MBean's pathname. Its parent path can be obtained by callingpath
onAMXProxy.parent()
-
getChildren
public ObjectName[] getChildren()
Deprecated.Description copied from interface:AMX_SPI
If no children are possible (a leaf node), an AttributeNotFoundException should be thrown.- Specified by:
getChildren
in interfaceAMX_SPI
-
childrenSet
public Set<AMXProxy> childrenSet()
Deprecated.Returns an array of children, including an empty array if there are none, but children are possible. Returns null if children are not possible.- Specified by:
childrenSet
in interfaceAMXProxy
-
childrenSet
public Set<AMXProxy> childrenSet(ObjectName[] objectNames)
Deprecated.
-
childrenTypes
public Set<String> childrenTypes(ObjectName[] objectNames)
Deprecated.
-
childrenMap
public Map<String,AMXProxy> childrenMap(String type)
Deprecated.Description copied from interface:AMXProxy
Get all children of a specified type, keyed by the name as found in the ObjectName.- Specified by:
childrenMap
in interfaceAMXProxy
-
childrenMap
public <T extends AMXProxy> Map<String,T> childrenMap(Class<T> intf)
Deprecated.Description copied from interface:AMXProxy
Get all children of the same type. The Map is keyed by the name as found in the ObjectName.- Specified by:
childrenMap
in interfaceAMXProxy
- Parameters:
intf
- the proxy interface, type is deduced from it
-
childrenMap
public <T extends AMXProxy> Map<String,T> childrenMap(String type, Class<T> intf)
Deprecated.
-
childrenMaps
public Map<String,Map<String,AMXProxy>> childrenMaps()
Deprecated.Description copied from interface:AMXProxy
Get Maps keyed by type, with a Map keyed by name.- Specified by:
childrenMaps
in interfaceAMXProxy
-
child
public AMXProxy child(String type)
Deprecated.Description copied from interface:AMXProxy
Get a singleton child of the specified type. An exception is thrown if the child is not a singleton. If children do not exist, or there is no such child, then null is returned.
-
child
public <T extends AMXProxy> T child(Class<T> intf)
Deprecated.Description copied from interface:AMXProxy
Get a singleton child. Its type is deduced from the interface usingUtil.deduceType(java.lang.Class<?>)
.
-
mbeanInfo
public final MBeanInfo mbeanInfo()
Deprecated.- Specified by:
mbeanInfo
in interfaceMetaGetters
-
attributesMap
public Map<String,Object> attributesMap(Set<String> attrNames)
Deprecated.Description copied from interface:AMXProxy
Get a Map keyed by Attribute name of the specified Attribute values.- Specified by:
attributesMap
in interfaceAMXProxy
-
attributesMap
public Map<String,Object> attributesMap()
Deprecated.Description copied from interface:AMXProxy
Get a Map keyed by Attribute name of all Attribute values. Requires a trip to the server.- Specified by:
attributesMap
in interfaceAMXProxy
-
getAttributeInfo
public MBeanAttributeInfo getAttributeInfo(String name)
Deprecated.
-
attributeNames
public Set<String> attributeNames()
Deprecated.Description copied from interface:AMXProxy
Get all available Attributes names, no trip to server needed. Requires a trip to the server.- Specified by:
attributeNames
in interfaceAMXProxy
-
getDescriptorField
public static <T> T getDescriptorField(MBeanInfo info, String name, T defaultValue)
Deprecated.
-
singleton
public static boolean singleton(MBeanInfo info)
Deprecated.
-
globalSingleton
public static boolean globalSingleton(MBeanInfo info)
Deprecated.
-
getDescriptorField
protected <T> T getDescriptorField(String name, T defaultValue)
Deprecated.
-
singleton
public boolean singleton()
Deprecated.Description copied from interface:MetaGetters
From Descriptor: true if this MBean is a singleton (1 instance within its parent scope)- Specified by:
singleton
in interfaceMetaGetters
-
globalSingleton
public boolean globalSingleton()
Deprecated.Description copied from interface:MetaGetters
From Descriptor: true if this MBean is a global singleton (1 instance within entire domain)- Specified by:
globalSingleton
in interfaceMetaGetters
-
group
public String group()
Deprecated.Description copied from interface:MetaGetters
From Descriptor: return the group value- Specified by:
group
in interfaceMetaGetters
-
supportsAdoption
public boolean supportsAdoption()
Deprecated.Description copied from interface:MetaGetters
From Descriptor: return true if new children are allowed by external subsystems- Specified by:
supportsAdoption
in interfaceMetaGetters
-
subTypes
public String[] subTypes()
Deprecated.Description copied from interface:MetaGetters
From Descriptor: Get the *potential* sub types this MBean expects to have- Specified by:
subTypes
in interfaceMetaGetters
-
java
public String java()
Deprecated.Description copied from interface:AMXProxy
Return a Java interface representing this MBean, suitable for display or compilation
-
descriptor
public Descriptor descriptor()
Deprecated.Description copied from interface:MetaGetters
MBeanInfo descriptor- Specified by:
descriptor
in interfaceMetaGetters
-
attributeInfo
public MBeanAttributeInfo attributeInfo(String attrName)
Deprecated.Description copied from interface:MetaGetters
Get MBeanOperationInfo for specified attribute name.- Specified by:
attributeInfo
in interfaceMetaGetters
-
operationInfo
public MBeanOperationInfo operationInfo(String operationName)
Deprecated.Description copied from interface:MetaGetters
Get MBeanOperationInfo for specified operation.- Specified by:
operationInfo
in interfaceMetaGetters
-
equals
public boolean equals(Object rhs)
Deprecated.- Overrides:
equals
in classMBeanProxyHandler
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classMBeanProxyHandler
-
-