com.jrockit.memleak.comm
Class ControllerDummy

java.lang.Object
  extended by com.jrockit.memleak.comm.ControllerDummy
All Implemented Interfaces:
Controller

public class ControllerDummy
extends java.lang.Object
implements Controller

Class that pretends to controlling the Memory Leak Server remotely, assuming that it is already running.

Author:
Markus Persson

Field Summary
static int DEFAULT_PORT
          The default port for this protocol (is this case, actually for the MLS protocol, since we have no controlling protocol).
static java.lang.String PROTOCOL
          The protocol identifier for this protocol (is this case, actually for the MLS protocol, since we have no controlling protocol).
 
Fields inherited from interface com.jrockit.memleak.comm.Controller
CONSTRUCTOR_SIGNATURE
 
Constructor Summary
ControllerDummy(java.lang.String hostName, int port, java.lang.String userName, java.lang.String password)
          Create a new dummy controller.
 
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 desiredPort)
          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

PROTOCOL

public static final java.lang.String PROTOCOL
The protocol identifier for this protocol (is this case, actually for the MLS protocol, since we have no controlling protocol).

See Also:
Constant Field Values

DEFAULT_PORT

public static final int DEFAULT_PORT
The default port for this protocol (is this case, actually for the MLS protocol, since we have no controlling protocol).

See Also:
Constant Field Values
Constructor Detail

ControllerDummy

public ControllerDummy(java.lang.String hostName,
                       int port,
                       java.lang.String userName,
                       java.lang.String password)
Create a new dummy controller.

Parameters:
hostName - the host name
port - the MLS port
userName - ignored
password - ignored
Method Detail

startMLS

public int startMLS()
             throws MemLeakControllerException
Description copied from interface: Controller
Start the memory leak server on the default port.

Specified by:
startMLS in interface Controller
Returns:
the port that the server is listening to.
Throws:
MemLeakControllerException

startMLS

public int startMLS(int desiredPort)
             throws MemLeakControllerException
Description copied from interface: Controller
Start the memory leak server.

Specified by:
startMLS in interface Controller
Parameters:
desiredPort - - the port the server should listen to, or 0 to let the OS choose
Returns:
the port that we are actually listening to.
Throws:
MemLeakControllerException

shutDownMLS

public void shutDownMLS()
                 throws MemLeakControllerException
Description copied from interface: Controller
Shutdown the memleak server.

Specified by:
shutDownMLS in interface Controller
Throws:
MemLeakControllerException

getMLSPort

public int getMLSPort()
               throws MemLeakControllerException
Description copied from interface: Controller
Check if the server is started, will return 0 if not started, otherwise returns the port it is listening to

Specified by:
getMLSPort in interface Controller
Returns:
the port it is listening to, or 0 if not started.
Throws:
MemLeakControllerException

printAvailableProtocolVersions

public void printAvailableProtocolVersions()
                                    throws MemLeakControllerException
Description copied from interface: Controller
For debugging, print all available protocol versions to stdout.

Specified by:
printAvailableProtocolVersions in interface Controller
Throws:
MemLeakControllerException


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.