TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.hyades.trace.ui.internal.util
Class PDCoreUtil

java.lang.Object
  extended by org.eclipse.tptp.platform.common.ui.trace.internal.util.PDCoreUtil
      extended by org.eclipse.hyades.trace.ui.internal.util.PDCoreUtil

public class PDCoreUtil
extends PDCoreUtil


Field Summary
static byte PI_MODE_APPLICATION
           
static byte PI_MODE_CONTROLLED
           
static byte PI_MODE_ENABLED
           
static byte PI_MODE_STANDALONE
           
 
Constructor Summary
PDCoreUtil()
           
 
Method Summary
static void addProcessParameters(Process lprocess, org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters parameters, boolean switchPerspective)
           
static java.util.Vector attach(AttachConfigurationDetail configurationDetail)
           
static org.eclipse.hyades.models.hierarchy.TRCAgentProxy attachToAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process, Agent agent)
          Equivalent to attachToAgent (process, agent, null, false)
static org.eclipse.hyades.models.hierarchy.TRCAgentProxy attachToAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process, java.lang.Object agent, java.util.Vector options, boolean mayNeedPolling)
          Attach to the agent passed in.
static void copyAgentProperties(org.eclipse.hyades.models.hierarchy.TRCAgentProxy fAgentOld, org.eclipse.hyades.models.hierarchy.TRCAgentProxy fAgent)
           
static Agent createAgent(Process lprocess, java.util.ArrayList filters, java.util.Vector options, org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy)
           
static Agent createAgent(Process lprocess, java.util.ArrayList filters, java.util.Vector options, org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy, java.lang.String agentName, java.lang.String agentType)
           
static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process, Agent a)
           
static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy processProxy, Agent agent, java.lang.String sessionId)
           
protected static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgentNoCheck(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process, Agent agent, java.lang.String sessionId)
           
protected static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgentNoCheck(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process, org.eclipse.tptp.platform.execution.client.agent.IAgent agent, java.lang.String sessionId)
           
protected static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgentNoCheck(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process, java.lang.Object agent, java.lang.String sessionId)
           
static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createUniqueAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy processProxy, java.lang.Object agent)
           
static void detachAgent(org.eclipse.hyades.models.hierarchy.TRCAgentProxy agent)
           
static void detachAgent(org.eclipse.hyades.models.hierarchy.TRCAgentProxy agent, boolean deregistrate)
           
static void doAttach(Agent agent, org.eclipse.hyades.models.hierarchy.TRCAgentProxy agentProxy)
          Equivalent to doAttach (null, agentProxy, agent, null)
static void doAttach(org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy, org.eclipse.hyades.models.hierarchy.TRCAgentProxy agentProxy, Agent agent, java.util.Vector options, org.eclipse.debug.core.ILaunchConfiguration configuration)
          Attaches to the execution agent (i.e.
static Agent getAgentInstance(java.lang.String hostName, int portNumber, org.eclipse.hyades.models.hierarchy.TRCAgentProxy trcAgent)
           
static java.util.Enumeration getNodeConfiguration(java.lang.String nodeName, int portNumber)
           
static java.util.Enumeration getNodeConfiguration(java.lang.String nodeName, int portNumber, boolean showErrorMsgs)
           
static boolean isTBFFile(byte[] magic)
           
static boolean isTBFFile(java.io.InputStream readStream)
           
static boolean isTBFFile(java.lang.String fileName)
           
static boolean isXMLFile(byte[] magic)
           
static boolean isXMLFile(java.io.InputStream readStream)
           
static boolean isXMLFile(java.lang.String fileName)
           
static boolean launchTrace(TraceArguments trace, java.util.ArrayList filters, java.util.Vector options, java.lang.String selectedProject, java.lang.String selectedMonitor, org.eclipse.debug.core.ILaunch launch)
          Deprecated. Contributors should avoid using this method. PrimaryLaunchDelegate provides a launch method that uses TPTP's standard for starting one or more profiling/monitoring session.
static boolean launchTrace(TraceArguments trace, java.util.ArrayList filters, java.util.Vector options, java.lang.String selectedProject, java.lang.String selectedMonitor, org.eclipse.debug.core.ILaunch launch, boolean switchPerspective)
          Deprecated. Contributors should avoid using this method. PrimaryLaunchDelegate provides a launch method that uses TPTP's standard for starting one or more profiling/monitoring session.
static void monitorAgents(org.eclipse.tptp.trace.ui.provisional.launcher.AgentSelection[] selection, org.eclipse.debug.core.ILaunchConfiguration configuration, boolean monitor)
           
static void setEnvironmentVariable(Process process, java.lang.String[] envVariables, PIProcessListener listener)
           
 
Methods inherited from class org.eclipse.tptp.platform.common.ui.trace.internal.util.PDCoreUtil
activate, createContainer, createDirectoryMessage, createMonitor, createNode, createProcess, createProcess, createUniqueAgent, detachAgents, findNode, getCorrespondingAgent, getDirectoryName, getPIVMArgument, isLocalHost, isPathExists, isProfilingPerspective, isZipFile, isZipFile, markModifiedResources, profileConnect, profileConnect, setAgentConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PI_MODE_CONTROLLED

public static final byte PI_MODE_CONTROLLED
See Also:
Constant Field Values

PI_MODE_APPLICATION

public static final byte PI_MODE_APPLICATION
See Also:
Constant Field Values

PI_MODE_STANDALONE

public static final byte PI_MODE_STANDALONE
See Also:
Constant Field Values

PI_MODE_ENABLED

public static final byte PI_MODE_ENABLED
See Also:
Constant Field Values
Constructor Detail

PDCoreUtil

public PDCoreUtil()
Method Detail

attach

public static final java.util.Vector attach(AttachConfigurationDetail configurationDetail)

attachToAgent

public static org.eclipse.hyades.models.hierarchy.TRCAgentProxy attachToAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process,
                                                                              Agent agent)
                                                                       throws InactiveAgentException,
                                                                              InactiveProcessException
Equivalent to attachToAgent (process, agent, null, false)

Throws:
InactiveAgentException
InactiveProcessException

attachToAgent

public static org.eclipse.hyades.models.hierarchy.TRCAgentProxy attachToAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process,
                                                                              java.lang.Object agent,
                                                                              java.util.Vector options,
                                                                              boolean mayNeedPolling)
                                                                       throws InactiveAgentException,
                                                                              InactiveProcessException
Attach to the agent passed in.

Parameters:
process - The model entity representing the process
agent - The agent to attach to
options - The options set for this attach session (can be null if 'mayNeedPolling' is set to false)
mayNeedPolling - Indicates whether polling may be needed. Regular polling is required for the aggregated JVMPI agent.
Returns:
The model entity representing the agent
Throws:
InactiveAgentException
InactiveProcessException

detachAgent

public static final void detachAgent(org.eclipse.hyades.models.hierarchy.TRCAgentProxy agent)
                              throws InactiveAgentException,
                                     InactiveProcessException
Throws:
InactiveAgentException
InactiveProcessException

detachAgent

public static final void detachAgent(org.eclipse.hyades.models.hierarchy.TRCAgentProxy agent,
                                     boolean deregistrate)
                              throws InactiveAgentException,
                                     InactiveProcessException
Throws:
InactiveAgentException
InactiveProcessException

doAttach

public static void doAttach(Agent agent,
                            org.eclipse.hyades.models.hierarchy.TRCAgentProxy agentProxy)
                     throws InactiveAgentException,
                            InactiveProcessException
Equivalent to doAttach (null, agentProxy, agent, null)

Throws:
InactiveAgentException
InactiveProcessException

doAttach

public static void doAttach(org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy,
                            org.eclipse.hyades.models.hierarchy.TRCAgentProxy agentProxy,
                            Agent agent,
                            java.util.Vector options,
                            org.eclipse.debug.core.ILaunchConfiguration configuration)
                     throws InactiveAgentException,
                            InactiveProcessException
Attaches to the execution agent (i.e. 'agent') that is passed in.

Parameters:
trcProcessProxy - The process proxy (Can be null if polling is not required)
agentProxy - The agent proxy
agent - The execution agent
options - The options for this attach session (Can be null if polling is not required)
Throws:
InactiveAgentException - In case of an inactive agent
InactiveProcessException - In case of an inactive process

addProcessParameters

public static void addProcessParameters(Process lprocess,
                                        org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters parameters,
                                        boolean switchPerspective)
                                 throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

createAgent

public static Agent createAgent(Process lprocess,
                                java.util.ArrayList filters,
                                java.util.Vector options,
                                org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy,
                                java.lang.String agentName,
                                java.lang.String agentType)

createAgent

public static Agent createAgent(Process lprocess,
                                java.util.ArrayList filters,
                                java.util.Vector options,
                                org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy)

launchTrace

public static final boolean launchTrace(TraceArguments trace,
                                        java.util.ArrayList filters,
                                        java.util.Vector options,
                                        java.lang.String selectedProject,
                                        java.lang.String selectedMonitor,
                                        org.eclipse.debug.core.ILaunch launch)
Deprecated. Contributors should avoid using this method. PrimaryLaunchDelegate provides a launch method that uses TPTP's standard for starting one or more profiling/monitoring session.


launchTrace

public static final boolean launchTrace(TraceArguments trace,
                                        java.util.ArrayList filters,
                                        java.util.Vector options,
                                        java.lang.String selectedProject,
                                        java.lang.String selectedMonitor,
                                        org.eclipse.debug.core.ILaunch launch,
                                        boolean switchPerspective)
Deprecated. Contributors should avoid using this method. PrimaryLaunchDelegate provides a launch method that uses TPTP's standard for starting one or more profiling/monitoring session.


getNodeConfiguration

public static java.util.Enumeration getNodeConfiguration(java.lang.String nodeName,
                                                         int portNumber,
                                                         boolean showErrorMsgs)

getAgentInstance

public static Agent getAgentInstance(java.lang.String hostName,
                                     int portNumber,
                                     org.eclipse.hyades.models.hierarchy.TRCAgentProxy trcAgent)

getNodeConfiguration

public static java.util.Enumeration getNodeConfiguration(java.lang.String nodeName,
                                                         int portNumber)

createAgentNoCheck

protected static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgentNoCheck(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process,
                                                                                      Agent agent,
                                                                                      java.lang.String sessionId)

createAgentNoCheck

protected static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgentNoCheck(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process,
                                                                                      org.eclipse.tptp.platform.execution.client.agent.IAgent agent,
                                                                                      java.lang.String sessionId)

createAgentNoCheck

protected static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgentNoCheck(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process,
                                                                                      java.lang.Object agent,
                                                                                      java.lang.String sessionId)

setEnvironmentVariable

public static void setEnvironmentVariable(Process process,
                                          java.lang.String[] envVariables,
                                          PIProcessListener listener)

copyAgentProperties

public static void copyAgentProperties(org.eclipse.hyades.models.hierarchy.TRCAgentProxy fAgentOld,
                                       org.eclipse.hyades.models.hierarchy.TRCAgentProxy fAgent)

createAgent

public static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process,
                                                                            Agent a)

createAgent

public static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy processProxy,
                                                                            Agent agent,
                                                                            java.lang.String sessionId)

createUniqueAgent

public static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createUniqueAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy processProxy,
                                                                                  java.lang.Object agent)

monitorAgents

public static void monitorAgents(org.eclipse.tptp.trace.ui.provisional.launcher.AgentSelection[] selection,
                                 org.eclipse.debug.core.ILaunchConfiguration configuration,
                                 boolean monitor)

isTBFFile

public static boolean isTBFFile(byte[] magic)

isTBFFile

public static boolean isTBFFile(java.io.InputStream readStream)
                         throws java.io.IOException
Throws:
java.io.IOException

isTBFFile

public static boolean isTBFFile(java.lang.String fileName)
                         throws java.io.IOException
Throws:
java.io.IOException

isXMLFile

public static boolean isXMLFile(byte[] magic)

isXMLFile

public static boolean isXMLFile(java.io.InputStream readStream)
                         throws java.io.IOException
Throws:
java.io.IOException

isXMLFile

public static boolean isXMLFile(java.lang.String fileName)
                         throws java.io.IOException
Throws:
java.io.IOException

TPTP 4.5.0 Platform Project
Internal API Specification