dk.netarkivet.monitor.jmx
Interface JMXProxyConnection


public interface JMXProxyConnection

JMX interface for connection objects that can be used for accessing MBeans on remote servers. Connection method and policies are implementation-dependent.


Method Summary
<T> T
createProxy(javax.management.ObjectName name, java.lang.Class<T> intf)
          Method to create a proxy to a given MBean on some remote server.
 boolean isLive()
          Returns true if this object still can return usable proxies.
 java.util.Set<javax.management.ObjectName> query(java.lang.String query)
          Get the set of ObjectNames from the remote MBeanserver, that matches the given query.
 

Method Detail

createProxy

<T> T createProxy(javax.management.ObjectName name,
                  java.lang.Class<T> intf)
Method to create a proxy to a given MBean on some remote server. Example use: SingleLogRecord logMsg = (SingleLogRecord) myJMXProxyFactory.createProxy(myObjectName,SingleLogRecord.class);

Type Parameters:
T -
Parameters:
name - The name of an MBean on some remote server.
intf - The interface that the returned proxy should implement.
Returns:
an object implementing T. This object forwards all method calls to the named MBean.

query

java.util.Set<javax.management.ObjectName> query(java.lang.String query)
Get the set of ObjectNames from the remote MBeanserver, that matches the given query.

Parameters:
query - the given query
Returns:
the set of ObjectNames, that matches the given query.
Throws:
IOFailure - on communication trouble.
ArgumentNotValid - on null or empty query.

isLive

boolean isLive()
Returns true if this object still can return usable proxies.

Returns:
True if we can return usable proxies. Otherwise, somebody may have to make a new instance of JMXProxyFactory to get new proxies.