|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.appserv.management.client.ProxyFactory
public final class ProxyFactory
Factory for AMX
proxies.
Usually proxies are obtained by starting with the DomainRoot obtained via
AppserverConnectionSource.getDomainRoot()
.
AppserverConnectionSource
Method Summary | ||
---|---|---|
boolean |
checkConnection()
Verify that the connection is still alive. |
|
DomainRoot |
createDomainRoot()
|
|
static ProxyFactory |
findInstance(ConnectionSource conn)
|
|
static ProxyFactory |
findInstance(MBeanServerConnection conn)
|
|
static ProxyFactory |
findInstanceByID(String mbeanServerID)
|
|
protected MBeanServerConnection |
getConnection()
|
|
ConnectionSource |
getConnectionSource()
|
|
DomainRoot |
getDomainRoot()
Return the DomainRoot. |
|
DomainRoot |
getDomainRoot(boolean waitReady)
If 'waitReady' is true, then upon return AMX is guaranteed to be fully loaded. |
|
ObjectName |
getDomainRootObjectName()
Return the ObjectName for the DomainMBean. |
|
static ProxyFactory |
getInstance(ConnectionSource conn)
Calls getInstance( connSource, true ). |
|
static ProxyFactory |
getInstance(ConnectionSource connSource,
boolean useMBeanServerID)
Get an instance. |
|
static ProxyFactory |
getInstance(MBeanServer server)
Get an instance of the ProxyFactory for the MBeanServer. |
|
static ProxyFactory |
getInstance(MBeanServerConnection conn)
Get an instance of the ProxyFactory for the MBeanServerConnection. |
|
String |
getMBeanServerID()
|
|
AMX |
getProxy(ObjectName objectName)
Deprecated. use versions that take a class as a parameter |
|
AMX |
getProxy(ObjectName objectName,
boolean create)
Deprecated. use versions that take a class as a parameter |
|
|
getProxy(ObjectName objectName,
Class<T> theInterface)
The actual interface(s) that the proxy implements are predetermined. |
|
|
getProxy(ObjectName objectName,
Class<T> theClass,
boolean create)
Get any existing proxy, returning null if none exists and 'create' is false. |
|
void |
handleNotification(Notification notifIn,
Object handback)
Listens for MBeanServerNotification.UNREGISTRATION_NOTIFICATION and JMXConnectionNotification and takes appropriate action. |
|
DomainRoot |
initDomainRoot()
|
|
AMX |
newProxyInstance(ObjectName objectName,
Class<?>[] interfaceClasses)
Instantiates a new proxy using the default AttributeNameMangler and with any desired number of interfaces. |
|
List<AMX> |
toProxyList(Collection<ObjectName> objectNames)
Convert a Collection of ObjectName to a List of AMX. |
|
Map<String,AMX> |
toProxyMap(Map<String,ObjectName> objectNameMap)
Convert a Map of ObjectName, and convert it to a Map of AMX, with the same keys. |
|
Set<AMX> |
toProxySet(Set<ObjectName> objectNames)
Convert a Set of ObjectName to a Set of AMX. |
|
protected static String |
toString(Object o)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean checkConnection()
public void handleNotification(Notification notifIn, Object handback)
NotificationListener
.
DO NOT CALL THIS METHOD.
handleNotification
in interface NotificationListener
public DomainRoot createDomainRoot() throws IOException
IOException
public DomainRoot initDomainRoot() throws IOException
IOException
public DomainRoot getDomainRoot()
public DomainRoot getDomainRoot(boolean waitReady)
waitReady
-
public ConnectionSource getConnectionSource()
public String getMBeanServerID()
public ObjectName getDomainRootObjectName() throws IOException
IOException
public static ProxyFactory getInstance(MBeanServer server)
server
- public static ProxyFactory getInstance(MBeanServerConnection conn)
public static ProxyFactory getInstance(ConnectionSource conn)
public static ProxyFactory getInstance(ConnectionSource connSource, boolean useMBeanServerID)
connSource
- the ConnectionSourceuseMBeanServerID
- use the MBeanServerID to determine if it's the same serverpublic static ProxyFactory findInstance(ConnectionSource conn)
public static ProxyFactory findInstance(MBeanServerConnection conn)
public static ProxyFactory findInstanceByID(String mbeanServerID)
public AMX getProxy(ObjectName objectName)
AMX
interface for the ObjectNamepublic AMX getProxy(ObjectName objectName, boolean create)
objectName
- ObjectName for which a proxy should be createdcreate
- true to create the proxy, false to return existing value
AMX
interface for the ObjectNamepublic <T extends AMX> T getProxy(ObjectName objectName, Class<T> theInterface)
AMX
interface for the ObjectNamepublic <T extends AMX> T getProxy(ObjectName objectName, Class<T> theClass, boolean create)
objectName
- ObjectName for which a proxy should be createdcreate
- true to create the proxy, false to return existing valuetheClass
- class of returned proxy, avoids casts and compiler warnings
AMX
interface for the ObjectNameprotected MBeanServerConnection getConnection() throws IOException
IOException
public AMX newProxyInstance(ObjectName objectName, Class<?>[] interfaceClasses) throws IOException
getProxy(javax.management.ObjectName)
objectName
- the target MBean which will be invoked by the proxyinterfaceClasses
- all interfaces the proxy should implement
IOException
protected static String toString(Object o)
public Set<AMX> toProxySet(Set<ObjectName> objectNames)
public List<AMX> toProxyList(Collection<ObjectName> objectNames)
public Map<String,AMX> toProxyMap(Map<String,ObjectName> objectNameMap)
|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2006 Sun Microsystems, Inc. All rights reserved.