dk.netarkivet.monitor.jmx
Class RmiProxyConnectionFactory

java.lang.Object
  extended by dk.netarkivet.monitor.jmx.RmiProxyConnectionFactory
All Implemented Interfaces:
JMXProxyConnectionFactory

public class RmiProxyConnectionFactory
extends java.lang.Object
implements JMXProxyConnectionFactory

Creates RMI-based JMX connections to remote servers.


Constructor Summary
RmiProxyConnectionFactory()
           
 
Method Summary
 JMXProxyConnection getConnection(java.lang.String server, int jmxPort, int rmiPort, java.lang.String userName, java.lang.String password)
          Returns a JMXProxyFactory for a specific server, jmxport, rmiport, username, and password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RmiProxyConnectionFactory

public RmiProxyConnectionFactory()
Method Detail

getConnection

public JMXProxyConnection getConnection(java.lang.String server,
                                        int jmxPort,
                                        int rmiPort,
                                        java.lang.String userName,
                                        java.lang.String password)
Returns a JMXProxyFactory for a specific server, jmxport, rmiport, username, and password. Makes sure that an initial context for JNDI has been specified. Then constructs a RMI-based JMXServiceUrl using the server and port. Finally connects to the URL using the name and password.

Specified by:
getConnection in interface JMXProxyConnectionFactory
Parameters:
server - the given remote server
jmxPort - the JMX port on that server
rmiPort - the RMI port on that server (dedicated to the above jmxPort)
userName - the userName for access to the MBeanserver on that server
password - the password for access to the MBeanserver on that server
Returns:
a JMXProxyFactory with the above properties.