|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jrockit.memleak.comm.ControllerRJMX
public class ControllerRJMX
Class for controlling the MemLeakServer remotely using RJMX.
This class will fail to initialize in pre-JDK 5.0 VMs (unless RJMX classes
are present). Instead, an ExceptionInInitializerError
is
thrown. RemoteMLSController
catches this (or
actually all LinkageError
s) along with
ClassNotFoundException
when it is determining which
protocols are available.
This way, it can differentiate between a protocol not being available at all (class does not initialize) and not available for a certain host/port (constructor fails). In the former case the protocol is marked as unavailable, and in the latter case not. When obtaining a controller, both kinds of failing protocols are skipped and the first controller that can be instantiated is used.
Some connectors (like this) do not ever fail in the constructor, because the protocols have no quick and reliable way of detecting if the server is actually talking the same protocol. (Merely checking if the server is listening to the port could be done if a protocol specific default port is requested by giving 0 as the port. But otherwise, this does not help to determine if a protocol is usable.)
Field Summary | |
---|---|
static int |
DEFAULT_PORT
The default port for this protocol. |
static java.lang.String |
PROTOCOL
The protocol identifier for this protocol. |
Fields inherited from interface com.jrockit.memleak.comm.Controller |
---|
CONSTRUCTOR_SIGNATURE |
Constructor Summary | |
---|---|
ControllerRJMX(java.lang.String hostName,
int port,
java.lang.String userName,
java.lang.String password)
Constructor. |
Method Summary | |
---|---|
int |
getMLSPort()
Check if the server is started, will return 0 if not started, otherwise returns the port it is listening to |
void |
printAvailableProtocolVersions()
For debugging, print all available protocol versions to stdout. |
void |
shutDownMLS()
Shutdown the memleak server. |
int |
startMLS()
Start the memory leak server on the default port. |
int |
startMLS(int port)
Start the memory leak server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROTOCOL
public static final int DEFAULT_PORT
Constructor Detail |
---|
public ControllerRJMX(java.lang.String hostName, int port, java.lang.String userName, java.lang.String password)
hostName
- the host running the management server.port
- the port on which the manegement server is listening.userName
- the user name, if authentication is needed to connect to the
server. May be null.password
- the password used to authenticate to the server, if needed.
May be null.Method Detail |
---|
public int startMLS() throws MemLeakControllerException
Controller
startMLS
in interface Controller
MemLeakControllerException
Controller.startMLS()
public int startMLS(int port) throws MemLeakControllerException
Controller
startMLS
in interface Controller
port
- - the port the server should listen to, or 0 to let the OS
choose
MemLeakControllerException
Controller.startMLS(int)
public void shutDownMLS() throws MemLeakControllerException
Controller
shutDownMLS
in interface Controller
MemLeakControllerException
Controller.shutDownMLS()
public int getMLSPort() throws MemLeakControllerException
Controller
getMLSPort
in interface Controller
MemLeakControllerException
Controller.getMLSPort()
public void printAvailableProtocolVersions() throws MemLeakControllerException
Controller
printAvailableProtocolVersions
in interface Controller
MemLeakControllerException
Controller.printAvailableProtocolVersions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |