TPTP 4.4.0 Platform Project
Internal API Specification

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

All Known Implementing Classes:
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

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

See Also:
AgentListener

removeAgentListener

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

See Also:
AgentListener

getProcess

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

Returns:
the Process if it exists, null otherwise.

setProcess

public void setProcess(Process p)

isAutoAttach

public 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

public void setAutoAttach(boolean auto)

attach

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

Throws:
InactiveAgentException
InactiveProcessException

detach

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

Throws:
InactiveAgentException
InactiveProcessException

getType

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

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

setType

public void setType(java.lang.String type)

getName

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

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

setName

public void setName(java.lang.String name)

getUUID

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

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

setUUID

public void setUUID(java.lang.String uuid)

isActive

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


setActive

public void setActive(boolean isActive)

isMonitored

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


setMonitored

public void setMonitored(boolean isMonitored)

isAttached

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


isAttached

public boolean isAttached(boolean remote)

setAttached

public void setAttached(boolean isAttached)

startMonitoring

public 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

public void stopMonitoring()
                    throws InactiveAgentException
Stop monitoring this agent.

Throws:
InactiveAgentException

setConfiguration

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


getConfiguration

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

Returns:
the AgentConfiguration if it exists, null otherwise.

publishConfiguration

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

Throws:
InactiveAgentException

invokeCustomCommand

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

Throws:
InactiveAgentException

isToProfileFile

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


getProfileFile

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

Returns:
String

setProfileFile

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

Parameters:
_profileFile - The _profileFile to set

TPTP 4.4.0 Platform Project
Internal API Specification