|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jrockit.memleak.comm.ControllerRMP
public class ControllerRMP
Class for controlling the Memory Leak Server remotely using RMP.
This class will not load if the RMP classes (client and common) are
unavailable. This will cause a ClassNotFoundException
which
RemoteMLSController
catches (along with
LinkageError
) 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 | |
---|---|
ControllerRMP(java.lang.String hostName,
int port,
java.lang.String userName,
java.lang.String password)
Constructor. |
Method Summary | |
---|---|
int[] |
getAvailableProtocolVersions()
Get all available protocol versions. |
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 ControllerRMP(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
startMLS
in interface Controller
MemLeakControllerException
public int startMLS(int port) throws MemLeakControllerException
startMLS
in interface Controller
port
- - the port the server should listen to, or 0 to let the OS
choose
MemLeakControllerException
public void shutDownMLS() throws MemLeakControllerException
shutDownMLS
in interface Controller
MemLeakControllerException
public int getMLSPort() throws MemLeakControllerException
getMLSPort
in interface Controller
MemLeakControllerException
public int[] getAvailableProtocolVersions() throws MemLeakControllerException
MemLeakControllerException
public void printAvailableProtocolVersions() throws MemLeakControllerException
Controller
printAvailableProtocolVersions
in interface Controller
MemLeakControllerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |