TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.jvmti.client.internal.launcher.util
Class AgentControllerDelegate

java.lang.Object
  extended by org.eclipse.tptp.platform.jvmti.client.internal.launcher.util.AgentControllerDelegate

public class AgentControllerDelegate
extends java.lang.Object

This delegate is used to keep track of connections with Agent Controller. Only one connection should be established with any one host. Establishing connections is expensive and should only be done once. This is a singleton class.


Method Summary
static boolean checkVMVersion(ILauncherParameterProvider launcher)
          The method checks a version of the target VM and returns true if VM version is 1.5.
static boolean checkVMVersion(java.lang.String hostName, int portNumber, java.lang.String location)
          The method checks a version of the target VM and returns true if VM version is 1.5
 org.eclipse.tptp.platform.execution.client.core.IAgentController getConnection(java.lang.String hostName, int portNumber)
           
 org.eclipse.tptp.platform.execution.client.core.IAgentController getConnection(java.lang.String hostName, int portNumber, boolean reuseExistingConnection)
           
static AgentControllerDelegate getInstance()
           
static java.lang.String getUnifiedHostName(java.lang.String hostName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AgentControllerDelegate getInstance()

getConnection

public org.eclipse.tptp.platform.execution.client.core.IAgentController getConnection(java.lang.String hostName,
                                                                                      int portNumber,
                                                                                      boolean reuseExistingConnection)
                                                                               throws java.lang.Exception
Throws:
java.lang.Exception

getConnection

public org.eclipse.tptp.platform.execution.client.core.IAgentController getConnection(java.lang.String hostName,
                                                                                      int portNumber)
                                                                               throws java.lang.Exception
Throws:
java.lang.Exception

getUnifiedHostName

public static java.lang.String getUnifiedHostName(java.lang.String hostName)

checkVMVersion

public static boolean checkVMVersion(java.lang.String hostName,
                                     int portNumber,
                                     java.lang.String location)
The method checks a version of the target VM and returns true if VM version is 1.5

Parameters:
hostName - The hostname that Agent Controller is running on
portNumber - The port number that Agent Controller is running on
location - The home directory of the process.
Returns:
true if VM version is 1.5 or higher otherwise - false

checkVMVersion

public static boolean checkVMVersion(ILauncherParameterProvider launcher)
The method checks a version of the target VM and returns true if VM version is 1.5. This method is equivalent to checkVMversion(launcher.getHostName(), launcher.getPortNumber(), launcher.getLocation()) - see the checkVMVersion method for more information.

Parameters:
launcher - provides the expected getter methods whose values are needed to perform a profile launch.
Returns:
true if VM version is 1.5 or higher otherwise - false

TPTP 4.5.0 Platform Project
Internal API Specification