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 StringADD_NOTIFICATION_LISTENERDeprecated.static StringREMOVE_NOTIFICATION_LISTENERDeprecated.-
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 protectedAMXProxyHandler(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 voidaddNotificationListener(Object[] args)Deprecated.<T extends AMXProxy>
Tas(Class<T> intf)Deprecated.convert to specified class.MBeanAttributeInfoattributeInfo(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.AMXProxychild(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.Descriptordescriptor()Deprecated.MBeanInfo descriptorDomainRootdomainRootProxy()Deprecated.booleanequals(Object rhs)Deprecated.Extraextra()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.StringgenericInterfaceName()Deprecated.static StringgenericInterfaceName(MBeanInfo info)Deprecated.MBeanAttributeInfogetAttributeInfo(String name)Deprecated.ObjectName[]getChildren()Deprecated.If no children are possible (a leaf node), an AttributeNotFoundException should be thrown.protected <T> TgetDescriptorField(String name, T defaultValue)Deprecated.static <T> TgetDescriptorField(MBeanInfo info, String name, T defaultValue)Deprecated.StringgetName()Deprecated.the unencoded name, which could differ from the value of the 'name' property in the ObjectNameObjectNamegetParent()Deprecated.Return the ObjectName of the parent.protected AMXProxygetProxy(ObjectName objectName)Deprecated.protected <T extends AMXProxy>
TgetProxy(ObjectName objectName, Class<T> intf)Deprecated.booleanglobalSingleton()Deprecated.From Descriptor: true if this MBean is a global singleton (1 instance within entire domain)static booleanglobalSingleton(MBeanInfo info)Deprecated.Stringgroup()Deprecated.From Descriptor: return the group valueinthashCode()Deprecated.StringinterfaceName()Deprecated.From Descriptor: get the Java classname of the interface for this MBean.static StringinterfaceName(MBeanInfo info)Deprecated.Objectinvoke(Object myProxy, Method method, Object[] args)Deprecated.Invoke the specified method.ObjectinvokeOp(String operationName)Deprecated.Invoke an operation by name, no arguments.ObjectinvokeOp(String operationName, Object[] args, String[] signature)Deprecated.Invoke an operation by name, JMX style params and signature.protected static booleanisSingleProxyGetter(Method method, int argCount)Deprecated.Return true if the method is one that is requesting a single AMX object.Stringjava()Deprecated.Return a Java interface representing this MBean, suitable for display or compilationMBeanInfombeanInfo()Deprecated.MBeanServerConnectionmbeanServerConnection()Deprecated.Get the MBeanServerConnection.StringnameProp()Deprecated.Value of the name property of the ObjectName.ObjectNameobjectName()Deprecated.The ObjectName of this MBean.MBeanOperationInfooperationInfo(String operationName)Deprecated.Get MBeanOperationInfo for specified operation.AMXProxyparent()Deprecated.MBean MUST return an ObjectName.StringparentPath()Deprecated.The value of thePARENT_PATH_KEYproperty in the ObjectNameStringpath()Deprecated.Get this MBean's pathname.ProxyFactoryproxyFactory()Deprecated.protected voidremoveNotificationListener(Object[] args)Deprecated.booleansingleton()Deprecated.From Descriptor: true if this MBean is a singleton (1 instance within its parent scope)static booleansingleton(MBeanInfo info)Deprecated.String[]subTypes()Deprecated.From Descriptor: Get the *potential* sub types this MBean expects to havebooleansupportsAdoption()Deprecated.From Descriptor: return true if new children are allowed by external subsystemsStringtype()Deprecated.The value of theTYPE_KEYproperty in the ObjectNamestatic AMXProxyHandlerunwrap(AMXProxy proxy)Deprecated.booleanvalid()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:AMXProxyadditional 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:MBeanProxyHandlerInvoke 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:
invokein interfaceInvocationHandler- Overrides:
invokein classMBeanProxyHandler- Throws:
Throwable
-
invokeOp
public Object invokeOp(String operationName)
Deprecated.Description copied from interface:AMXProxyInvoke an operation by name, no arguments.
-
invokeOp
public Object invokeOp(String operationName, Object[] args, String[] signature)
Deprecated.Description copied from interface:AMXProxyInvoke 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:
IOExceptionInstanceNotFoundException
-
removeNotificationListener
protected void removeNotificationListener(Object[] args) throws IOException, InstanceNotFoundException, ListenerNotFoundException
Deprecated.
-
interfaceName
public String interfaceName()
Deprecated.Description copied from interface:MetaGettersFrom 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:
interfaceNamein interfaceMetaGetters- Overrides:
interfaceNamein classMBeanProxyHandler
-
genericInterfaceName
public String genericInterfaceName()
Deprecated.
-
genericInterface
public Class<? extends AMXProxy> genericInterface()
Deprecated.Description copied from interface:MetaGettersFrom 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:
genericInterfacein interfaceMetaGetters
-
valid
public boolean valid()
Deprecated.Description copied from interface:AMXProxyA 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:
proxyFactoryin interfaceExtra- Returns:
- the
ProxyFactorythat created this proxy.
-
mbeanServerConnection
public MBeanServerConnection mbeanServerConnection()
Deprecated.Description copied from interface:ExtraGet the MBeanServerConnection.- Specified by:
mbeanServerConnectionin interfaceExtra
-
objectName
public ObjectName objectName()
Deprecated.Description copied from interface:AMXProxyThe ObjectName of this MBean.- Specified by:
objectNamein interfaceAMXProxy
-
nameProp
public String nameProp()
Deprecated.Description copied from interface:AMXProxyValue 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:AMXProxyThe value of thePARENT_PATH_KEYproperty in the ObjectName- Specified by:
parentPathin interfaceAMXProxy
-
type
public String type()
Deprecated.Description copied from interface:AMXProxyThe value of theTYPE_KEYproperty in the ObjectName
-
getName
public String getName()
Deprecated.Description copied from interface:AMX_SPIthe 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_SPIReturn the ObjectName of the parent. Must not be null (except for DomainRoot)
-
parent
public AMXProxy parent()
Deprecated.Description copied from interface:AMXProxyMBean MUST return an ObjectName. May be null for DomainRoot only.
-
path
public String path()
Deprecated.Description copied from interface:AMXProxyGet this MBean's pathname. Its parent path can be obtained by callingpathonAMXProxy.parent()
-
getChildren
public ObjectName[] getChildren()
Deprecated.Description copied from interface:AMX_SPIIf no children are possible (a leaf node), an AttributeNotFoundException should be thrown.- Specified by:
getChildrenin 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:
childrenSetin 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:AMXProxyGet all children of a specified type, keyed by the name as found in the ObjectName.- Specified by:
childrenMapin interfaceAMXProxy
-
childrenMap
public <T extends AMXProxy> Map<String,T> childrenMap(Class<T> intf)
Deprecated.Description copied from interface:AMXProxyGet all children of the same type. The Map is keyed by the name as found in the ObjectName.- Specified by:
childrenMapin 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:AMXProxyGet Maps keyed by type, with a Map keyed by name.- Specified by:
childrenMapsin interfaceAMXProxy
-
child
public AMXProxy child(String type)
Deprecated.Description copied from interface:AMXProxyGet 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:AMXProxyGet a singleton child. Its type is deduced from the interface usingUtil.deduceType(java.lang.Class<?>).
-
mbeanInfo
public final MBeanInfo mbeanInfo()
Deprecated.- Specified by:
mbeanInfoin interfaceMetaGetters
-
attributesMap
public Map<String,Object> attributesMap(Set<String> attrNames)
Deprecated.Description copied from interface:AMXProxyGet a Map keyed by Attribute name of the specified Attribute values.- Specified by:
attributesMapin interfaceAMXProxy
-
attributesMap
public Map<String,Object> attributesMap()
Deprecated.Description copied from interface:AMXProxyGet a Map keyed by Attribute name of all Attribute values. Requires a trip to the server.- Specified by:
attributesMapin interfaceAMXProxy
-
getAttributeInfo
public MBeanAttributeInfo getAttributeInfo(String name)
Deprecated.
-
attributeNames
public Set<String> attributeNames()
Deprecated.Description copied from interface:AMXProxyGet all available Attributes names, no trip to server needed. Requires a trip to the server.- Specified by:
attributeNamesin 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:MetaGettersFrom Descriptor: true if this MBean is a singleton (1 instance within its parent scope)- Specified by:
singletonin interfaceMetaGetters
-
globalSingleton
public boolean globalSingleton()
Deprecated.Description copied from interface:MetaGettersFrom Descriptor: true if this MBean is a global singleton (1 instance within entire domain)- Specified by:
globalSingletonin interfaceMetaGetters
-
group
public String group()
Deprecated.Description copied from interface:MetaGettersFrom Descriptor: return the group value- Specified by:
groupin interfaceMetaGetters
-
supportsAdoption
public boolean supportsAdoption()
Deprecated.Description copied from interface:MetaGettersFrom Descriptor: return true if new children are allowed by external subsystems- Specified by:
supportsAdoptionin interfaceMetaGetters
-
subTypes
public String[] subTypes()
Deprecated.Description copied from interface:MetaGettersFrom Descriptor: Get the *potential* sub types this MBean expects to have- Specified by:
subTypesin interfaceMetaGetters
-
java
public String java()
Deprecated.Description copied from interface:AMXProxyReturn a Java interface representing this MBean, suitable for display or compilation
-
descriptor
public Descriptor descriptor()
Deprecated.Description copied from interface:MetaGettersMBeanInfo descriptor- Specified by:
descriptorin interfaceMetaGetters
-
attributeInfo
public MBeanAttributeInfo attributeInfo(String attrName)
Deprecated.Description copied from interface:MetaGettersGet MBeanOperationInfo for specified attribute name.- Specified by:
attributeInfoin interfaceMetaGetters
-
operationInfo
public MBeanOperationInfo operationInfo(String operationName)
Deprecated.Description copied from interface:MetaGettersGet MBeanOperationInfo for specified operation.- Specified by:
operationInfoin interfaceMetaGetters
-
equals
public boolean equals(Object rhs)
Deprecated.- Overrides:
equalsin classMBeanProxyHandler
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classMBeanProxyHandler
-
-