FileDocCategorySizeDatePackage
VMConnection.javaAPI DocphoneME MR2 API (J2ME)4747Wed May 02 17:59:48 BST 2007com.sun.cldchi.tools.memoryprofiler.jdwp

VMConnection

public interface VMConnection
The VMConnection declares interface between transport layer and data providing layer of the memory profiler. It allows sending commands to the VM and receiving replies as instances of VMReply. The default implementation of this interface is provided by VMConnectionFactory.
see
com.sun.cldchi.tools.memoryprofiler.jdwp.VMConnection
see
com.sun.cldchi.tools.memoryprofiler.jdwp.VMConnectionFactory

Fields Summary
Constructors Summary
Methods Summary
public voidcloseConnections()
Disconnects from a KDP.

see
#isConnected()
see
#connect(String hostName, int port)

public voidconnect(java.lang.String hostName, int port)
Connects to the KDP running on hostName:port. Could throw ConnectException unless connection is successful

param
hostName - name of host where KDP runs
param
port - number of port where KDP listens
see
#isConnected()
see
#closeConnections()

public booleanisConnected()
Checks if the instance is connected to a KDP.

return
true if is connected to a kdp, false otherwise.
see
#connect(String hostName, int port)
see
#closeConnections()

public voidsendCommand(int command)
Sends a command to the VM, which doesn't produces and responce. Could throw DebugeeException unless sending command is successful This functions requires connection to a KDP and will throw DebugeeException otherwise. You can check it with isConnected() function. To connect to a kdp you must use connect(String hostName, int port) function.

param
command - code of command to be sent
see
#sendReplyCommand(int command)
see
#isConnected()

public VMReplysendReplyCommand(int command, int[] params)
Sends a command to the VM, which produces some responce and returns instance of VMReply for working with the responce. Could throw DebugeeException unless sending command is successful This functions requires connection to a KDP and will throw DebugeeException otherwise. You can check it with isConnected() function. To connect to a KDP you must use connect(String hostName, int port) function.

param
command - code of command to be sent
param
params - additional command parameters
return
instance of VMReply for working with the VM responce
see
#sendCommand(int command)
see
#isConnected()

public VMReplysendReplyCommand(int command)
Sends a command to the VM which don't needs any parameters, which produces some responce and returns instance of VMReply for working with the responce. Could throw DebugeeException unless sending command is successful This functions requires connection to a KDP and will throw DebugeeException otherwise. You can check it with isConnected() function. To connect to a KDP you must use connect(String hostName, int port) function.

param
command - code of command to be sent
return
instance of VMReply for working with the VM responce
see
#sendCommand(int command)
see
#isConnected()