|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.monitor.jmx.JMXUtils
public class JMXUtils
Various JMX-related utility functions that have nowhere better to live.
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
JMXUtils()
|
Method Summary | |
---|---|
static javax.management.MBeanServerConnection |
getMBeanServerConnection(javax.management.remote.JMXServiceURL url,
java.util.Map<java.lang.String,java.lang.String[]> credentials)
Connects to the given (url-specified) service point, sending the given credentials as login. |
static javax.management.MBeanServerConnection |
getMBeanServerConnection(java.lang.String server,
int jmxPort,
int rmiPort,
java.lang.String userName,
java.lang.String password)
Returns a connection to a remote MbeanServer defined by the given arguments. |
static javax.management.remote.JMXServiceURL |
getUrl(java.lang.String server,
int jmxPort,
int rmiPort)
Constructs the same service URL that JConsole does on the basis of a server name, a JMX port number, and a RMI port number. |
static java.util.Map<java.lang.String,java.lang.String[]> |
packageCredentials(java.lang.String userName,
java.lang.String password)
Packages credentials as an environment for JMX connections. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static org.apache.commons.logging.Log log
Constructor Detail |
---|
public JMXUtils()
Method Detail |
---|
public static javax.management.remote.JMXServiceURL getUrl(java.lang.String server, int jmxPort, int rmiPort)
server
- The server that should be connected to using
the constructed URL.jmxPort
- The number of the JMX port that should be connected to
using the constructed URLrmiPort
- The number of the RMI port that should be connected to
using the constructed URL
public static javax.management.MBeanServerConnection getMBeanServerConnection(java.lang.String server, int jmxPort, int rmiPort, java.lang.String userName, java.lang.String password)
server
- the remote servernamejmxPort
- the remote jmx-portrmiPort
- the remote rmi-portuserName
- the usernamepassword
- the password
public static javax.management.MBeanServerConnection getMBeanServerConnection(javax.management.remote.JMXServiceURL url, java.util.Map<java.lang.String,java.lang.String[]> credentials)
url
- The JMX service url of some JVM on some machine.credentials
- a map with (at least) one entry, mapping
"jmx.remote.credentials" to a String array of length 2.
Its first item should be the user name.
Its second item should be the password.
public static java.util.Map<java.lang.String,java.lang.String[]> packageCredentials(java.lang.String userName, java.lang.String password)
userName
- The user to login aspassword
- The password to use for that user
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |