TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.hyades.internal.execution.local.control
Interface Agent

All Known Implementing Classes:
AgentDiscovererDelegateHelper.DummyAgent, AgentImpl

public interface Agent


Method Summary
 void addAgentListener(AgentListener listener)
          Add a listener that will inform you when this Agent becomes active/inactive.
 void attach()
          Attach to the agent.
 void detach()
          Detach from the agent.
 AgentConfiguration getConfiguration()
          Get the configuration object for this agent.
 java.lang.String getName()
          Retrieve the name of this agent.
 Process getProcess()
          Get the process which this agent is a member of.
 java.lang.String getProfileFile()
          Get the fully quality path of profiling file
 java.lang.String getType()
          Retrieve the type name of this agent.
 java.lang.String getUUID()
          Retrieve the UUID of this agent.
 void invokeCustomCommand(CustomCommand command)
          Send a custom command to the agent for processing.
 boolean isActive()
          Determine whether this agent is currently active.
 boolean isAttached()
          Determine is this agent is currently attached to a client.
 boolean isAttached(boolean remote)
           
 boolean isAutoAttach()
          If autoAttach is set, this is like registering an interest in this agent.
 boolean isMonitored()
          Determine if this agent is currently being monitored.
 boolean isToProfileFile()
          Determine if this agent is sending data to a profiling file
 void publishConfiguration()
          Publish's the AgentConfiguration to an active agent
 void removeAgentListener(AgentListener listener)
          Remove a listener previously added with addAgentListener.
 void setActive(boolean isActive)
           
 void setAttached(boolean isAttached)
           
 void setAutoAttach(boolean auto)
           
 void setConfiguration(AgentConfiguration config)
          Set the configuration for the agent.
 void setMonitored(boolean isMonitored)
           
 void setName(java.lang.String name)
           
 void setProcess(Process p)
           
 void setProfileFile(java.lang.String _profileFile)
          Set the fully quality path of profiling file
 void setType(java.lang.String type)
           
 void setUUID(java.lang.String uuid)
           
 void startMonitoring(DataProcessor processor)
          Start monitoring the data output of this agent using the specified DataProcessor.
 void stopMonitoring()
          Stop monitoring this agent.
 

Method Detail

addAgentListener

void addAgentListener(AgentListener listener)
Add a listener that will inform you when this Agent becomes active/inactive.

See Also:
AgentListener

removeAgentListener

void removeAgentListener(AgentListener listener)
Remove a listener previously added with addAgentListener.

See Also:
AgentListener

getProcess

Process getProcess()
Get the process which this agent is a member of.

Returns:
the Process if it exists, null otherwise.

setProcess

void setProcess(Process p)

isAutoAttach

boolean isAutoAttach()
If autoAttach is set, this is like registering an interest in this agent. It may not exist yet within the process, but you want to be attached to the agent as soon as it becomes active.


setAutoAttach

void setAutoAttach(boolean auto)

attach

void attach()
            throws InactiveAgentException,
                   InactiveProcessException
Attach to the agent.

Throws:
InactiveAgentException
InactiveProcessException

detach

void detach()
            throws InactiveAgentException,
                   InactiveProcessException
Detach from the agent.

Throws:
InactiveAgentException
InactiveProcessException

getType

java.lang.String getType()
Retrieve the type name of this agent.

Returns:
the type of the agent if known, null otherwise.

setType

void setType(java.lang.String type)

getName

java.lang.String getName()
Retrieve the name of this agent.

Returns:
the name of the agent if known, null otherwise.

setName

void setName(java.lang.String name)

getUUID

java.lang.String getUUID()
Retrieve the UUID of this agent.

Returns:
the uuid of the agent if it is known, null otherwise.

setUUID

void setUUID(java.lang.String uuid)

isActive

boolean isActive()
Determine whether this agent is currently active.


setActive

void setActive(boolean isActive)

isMonitored

boolean isMonitored()
Determine if this agent is currently being monitored.


setMonitored

void setMonitored(boolean isMonitored)

isAttached

boolean isAttached()
Determine is this agent is currently attached to a client.


isAttached

boolean isAttached(boolean remote)

setAttached

void setAttached(boolean isAttached)

startMonitoring

void startMonitoring(DataProcessor processor)
                     throws InactiveAgentException
Start monitoring the data output of this agent using the specified DataProcessor. You must be attached to the agent before you can start monitoring it.

Throws:
InactiveAgentException

stopMonitoring

void stopMonitoring()
                    throws InactiveAgentException
Stop monitoring this agent.

Throws:
InactiveAgentException

setConfiguration

void setConfiguration(AgentConfiguration config)
Set the configuration for the agent.


getConfiguration

AgentConfiguration getConfiguration()
Get the configuration object for this agent.

Returns:
the AgentConfiguration if it exists, null otherwise.

publishConfiguration

void publishConfiguration()
                          throws InactiveAgentException
Publish's the AgentConfiguration to an active agent

Throws:
InactiveAgentException

invokeCustomCommand

void invokeCustomCommand(CustomCommand command)
                         throws InactiveAgentException
Send a custom command to the agent for processing.

Throws:
InactiveAgentException

isToProfileFile

boolean isToProfileFile()
Determine if this agent is sending data to a profiling file


getProfileFile

java.lang.String getProfileFile()
Get the fully quality path of profiling file

Returns:
String

setProfileFile

void setProfileFile(java.lang.String _profileFile)
Set the fully quality path of profiling file

Parameters:
_profileFile - The _profileFile to set

TPTP 4.5.0 Platform Project
Internal API Specification