Class ProxyFactory
- java.lang.Object
-
- org.glassfish.admin.amx.core.proxy.ProxyFactory
-
- All Implemented Interfaces:
EventListener
,NotificationListener
@Deprecated @Taxonomy(stability=UNCOMMITTED) public final class ProxyFactory extends Object implements NotificationListener
Deprecated.Factory forAMXProxy
proxies.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
checkConnection()
Deprecated.Verify that the connection is still alive.DomainRoot
createDomainRoot()
Deprecated.static ProxyFactory
findInstance(MBeanServerConnection conn)
Deprecated.static ProxyFactory
findInstanceByID(String mbeanServerID)
Deprecated.static Class<? extends AMXProxy>
genericInterface(MBeanInfo info)
Deprecated.ObjectName
getDomainRootObjectName()
Deprecated.Return the ObjectName for the DomainMBean.DomainRoot
getDomainRootProxy()
Deprecated.Return the DomainRoot.DomainRoot
getDomainRootProxy(boolean waitReady)
Deprecated.If 'waitReady' is true, then upon return AMX is guaranteed to be fully loaded.static ProxyFactory
getInstance(MBeanServer server)
Deprecated.Get an instance of the ProxyFactory for the MBeanServer.static ProxyFactory
getInstance(MBeanServerConnection conn)
Deprecated.Get an instance of the ProxyFactory for the MBeanServerConnection.static ProxyFactory
getInstance(MBeanServerConnection conn, boolean useMBeanServerID)
Deprecated.Get an instance.MBeanInfo
getMBeanInfo(ObjectName objectName)
Deprecated.Return (possibly cached) MBeanInfo.protected MBeanServerConnection
getMBeanServerConnection()
Deprecated.String
getMBeanServerID()
Deprecated.AMXProxy
getProxy(ObjectName objectName)
Deprecated.Call getProxy(objectName, getGenericAMXInterface()<T extends AMXProxy>
TgetProxy(ObjectName objectName, Class<T> intf)
Deprecated.Get any existing proxy, returning null if none exists and 'create' is false.void
handleNotification(Notification notifIn, Object handback)
Deprecated.Listens for MBeanServerNotification.UNREGISTRATION_NOTIFICATION and JMXConnectionNotification and takes appropriate action.DomainRoot
initDomainRoot()
Deprecated.static boolean
invariantMBeanInfo(MBeanInfo info)
Deprecated.AMXProxy[]
toProxy(ObjectName[] objectNames)
Deprecated.Array entries for MBeans that are no longer registered will contain null values.List<AMXProxy>
toProxyList(Collection<ObjectName> objectNames)
Deprecated.Convert a Collection of ObjectName to a List of AMX.List<AMXProxy>
toProxyList(ObjectName[] objectNames, Class<? extends AMXProxy> intf)
Deprecated.Resulting list could differ in size if some MBeans are no longer registeredMap<String,AMXProxy>
toProxyMap(Map<String,ObjectName> objectNameMap)
Deprecated.Convert a Map of ObjectName, and convert it to a Map of AMX, with the same keys.Map<String,AMXProxy>
toProxyMap(ObjectName[] objectNames, Class<? extends AMXProxy> intf)
Deprecated.Resulting Map could differ in size if some MBeans are no longer registeredSet<AMXProxy>
toProxySet(Set<ObjectName> objectNames)
Deprecated.Convert a Set of ObjectName to a Set of AMX.Set<AMXProxy>
toProxySet(ObjectName[] objectNames, Class<? extends AMXProxy> intf)
Deprecated.Convert a Set of ObjectName to a Set of AMX.protected static String
toString(Object o)
Deprecated.
-
-
-
Method Detail
-
checkConnection
public boolean checkConnection()
Deprecated.Verify that the connection is still alive.
-
handleNotification
public void handleNotification(Notification notifIn, Object handback)
Deprecated.Listens for MBeanServerNotification.UNREGISTRATION_NOTIFICATION and JMXConnectionNotification and takes appropriate action.
Used internally as callback forNotificationListener
. DO NOT CALL THIS METHOD.- Specified by:
handleNotification
in interfaceNotificationListener
-
createDomainRoot
public DomainRoot createDomainRoot()
Deprecated.
-
initDomainRoot
public DomainRoot initDomainRoot() throws IOException
Deprecated.- Throws:
IOException
-
getDomainRootObjectName
public ObjectName getDomainRootObjectName()
Deprecated.Return the ObjectName for the DomainMBean.
-
getDomainRootProxy
public DomainRoot getDomainRootProxy()
Deprecated.Return the DomainRoot. AMX is guaranteed to be ready after this call returns.- Returns:
- the DomainRoot for this factory.
-
getDomainRootProxy
public DomainRoot getDomainRootProxy(boolean waitReady)
Deprecated.If 'waitReady' is true, then upon return AMX is guaranteed to be fully loaded. Otherwise AMX MBeans may continue to initialize asynchronously.- Parameters:
waitReady
-- Returns:
- the DomainRoot for this factory.
-
getMBeanServerID
public String getMBeanServerID()
Deprecated.- Returns:
- the JMX MBeanServerID for the MBeanServer in which MBeans reside.
-
getInstance
public static ProxyFactory getInstance(MBeanServer server)
Deprecated.Get an instance of the ProxyFactory for the MBeanServer. Generally not applicable for remote clients.- Parameters:
server
-
-
getInstance
public static ProxyFactory getInstance(MBeanServerConnection conn)
Deprecated.Get an instance of the ProxyFactory for the MBeanServerConnection. Creates a ConnectionSource for it and calls getInstance( connSource, true ).
-
getInstance
public static ProxyFactory getInstance(MBeanServerConnection conn, boolean useMBeanServerID)
Deprecated.Get an instance. If 'useMBeanServerID' is false, and the ConnectionSource is not one that has been passed before, a new ProxyFactory is instantiated which will not share its proxies with any previously-instantiated ones. Such usage is discouraged, as it duplicates proxies. Pass 'true' unless there is an excellent reason to pass 'false'.- Parameters:
connSource
- the ConnectionSourceuseMBeanServerID
- use the MBeanServerID to determine if it's the same server
-
findInstance
public static ProxyFactory findInstance(MBeanServerConnection conn)
Deprecated.- Returns:
- ProxyFactory corresponding to the MBeanServerConnection
-
findInstanceByID
public static ProxyFactory findInstanceByID(String mbeanServerID)
Deprecated.- Returns:
- ProxyFactory corresponding to the MBeanServerID
-
getMBeanInfo
public MBeanInfo getMBeanInfo(ObjectName objectName)
Deprecated.Return (possibly cached) MBeanInfo. If the MBean does not exist, then null is returned.
-
invariantMBeanInfo
public static boolean invariantMBeanInfo(MBeanInfo info)
Deprecated.
-
getMBeanServerConnection
protected MBeanServerConnection getMBeanServerConnection()
Deprecated.- Returns:
- MBeanServerConnection used by this factory
-
getProxy
public <T extends AMXProxy> T getProxy(ObjectName objectName, Class<T> intf)
Deprecated.Get any existing proxy, returning null if none exists and 'create' is false. If an MBean is no longer registered, the proxy returned will be null.- Parameters:
objectName
- ObjectName for which a proxy should be createdintf
- class of returned proxy, avoids casts and compiler warnings- Returns:
- an appropriate
AMXProxy
interface for the ObjectName
-
getProxy
public AMXProxy getProxy(ObjectName objectName)
Deprecated.Call getProxy(objectName, getGenericAMXInterface()
-
genericInterface
public static Class<? extends AMXProxy> genericInterface(MBeanInfo info)
Deprecated.
-
toProxy
public AMXProxy[] toProxy(ObjectName[] objectNames)
Deprecated.Array entries for MBeans that are no longer registered will contain null values.
-
toProxySet
public Set<AMXProxy> toProxySet(Set<ObjectName> objectNames)
Deprecated.Convert a Set of ObjectName to a Set of AMX. The resulting Set may be smaller than the original if, for example, some MBeans are no longer registered.
-
toProxySet
public Set<AMXProxy> toProxySet(ObjectName[] objectNames, Class<? extends AMXProxy> intf)
Deprecated.Convert a Set of ObjectName to a Set of AMX. The resulting Set may be smaller than the original if, for example, some MBeans are no longer registered.
-
toProxyList
public List<AMXProxy> toProxyList(Collection<ObjectName> objectNames)
Deprecated.Convert a Collection of ObjectName to a List of AMX. Resulting Map could differ in size if some MBeans are no longer registered.- Returns:
- a List of AMX from a List of ObjectName.
-
toProxyMap
public Map<String,AMXProxy> toProxyMap(Map<String,ObjectName> objectNameMap)
Deprecated.Convert a Map of ObjectName, and convert it to a Map of AMX, with the same keys. Resulting Map could differ in size if some MBeans are no longer registered.- Returns:
- a Map of AMX from a Map of ObjectName.
-
toProxyMap
public Map<String,AMXProxy> toProxyMap(ObjectName[] objectNames, Class<? extends AMXProxy> intf)
Deprecated.Resulting Map could differ in size if some MBeans are no longer registered
-
toProxyList
public List<AMXProxy> toProxyList(ObjectName[] objectNames, Class<? extends AMXProxy> intf)
Deprecated.Resulting list could differ in size if some MBeans are no longer registered
-
-