cartago
Class AgentBody

java.lang.Object
  extended by cartago.AgentBody
All Implemented Interfaces:
ICartagoContext

public class AgentBody
extends java.lang.Object
implements ICartagoContext

Agent descriptor - keeping track of agent info inside a workspace

Author:
aricci

Field Summary
protected  ICartagoCallback agentCallback
           
protected  AgentBodyArtifact bodyArtifact
           
protected  java.util.LinkedList<ArtifactDescriptor> focusedArtifacts
           
 
Method Summary
 void addFocusedArtifacts(ArtifactDescriptor des)
           
 void doAction(long actionId, ArtifactId aid, Op op, IAlignmentTest test, long timeout)
          Use an artifact by requesting the execution of the specified operation.
 void doAction(long actionId, Op op, IAlignmentTest test, long timeout)
          Use an artifact by requesting the execution of the specified operation.
 void doAction(long actionId, java.lang.String name, Op op, IAlignmentTest test, long timeout)
          Use an artifact by requesting the execution of the specified operation.
 AgentBodyArtifact getAgentBodyArtifact()
           
 AgentId getAgentId()
          Get agent id in the workspace
 ICartagoCallback getCallback()
           
 WorkspaceId getWorkspaceId()
          Get workspace id
 WorkspaceKernel getWSPKernel()
           
 boolean isObserving(ArtifactId id)
           
 void removeFocusedArtifacts(ArtifactDescriptor des)
           
 void setBodyArtifact(AgentBodyArtifact art)
           
 void updateObsArtifactListWith(java.util.List<ObservableArtifactInfo> list, java.util.List<ObservableArtifactInfo> stopFocus, java.util.List<ObservableArtifactInfo> newFocus)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

agentCallback

protected ICartagoCallback agentCallback

focusedArtifacts

protected java.util.LinkedList<ArtifactDescriptor> focusedArtifacts

bodyArtifact

protected AgentBodyArtifact bodyArtifact
Method Detail

getAgentId

public AgentId getAgentId()
Description copied from interface: ICartagoContext
Get agent id in the workspace

Specified by:
getAgentId in interface ICartagoContext
Returns:

getWorkspaceId

public WorkspaceId getWorkspaceId()
Description copied from interface: ICartagoContext
Get workspace id

Specified by:
getWorkspaceId in interface ICartagoContext
Returns:

getWSPKernel

public WorkspaceKernel getWSPKernel()

setBodyArtifact

public void setBodyArtifact(AgentBodyArtifact art)

getAgentBodyArtifact

public AgentBodyArtifact getAgentBodyArtifact()

doAction

public void doAction(long actionId,
                     ArtifactId aid,
                     Op op,
                     IAlignmentTest test,
                     long timeout)
              throws CartagoException
Description copied from interface: ICartagoContext
Use an artifact by requesting the execution of the specified operation.

Specified by:
doAction in interface ICartagoContext
Parameters:
actionId - identifier of the use action - used by the callback
aid - target artifact
op - operation to execute
test - alignment test - null if not specified
timeout - operation timeout - -1 if not specified
Throws:
CartagoException

doAction

public void doAction(long actionId,
                     java.lang.String name,
                     Op op,
                     IAlignmentTest test,
                     long timeout)
              throws CartagoException
Description copied from interface: ICartagoContext
Use an artifact by requesting the execution of the specified operation.

Specified by:
doAction in interface ICartagoContext
Parameters:
actionId - identifier of the use action - used by the callback
name - target artifact
op - operation to execute
test - alignment test - null if not specified
timeout - operation timeout - -1 if not specified
Throws:
CartagoException

doAction

public void doAction(long actionId,
                     Op op,
                     IAlignmentTest test,
                     long timeout)
              throws CartagoException
Description copied from interface: ICartagoContext
Use an artifact by requesting the execution of the specified operation.

Specified by:
doAction in interface ICartagoContext
Parameters:
actionId - identifier of the use action - used by the callback
op - operation to execute
test - alignment test - null if not specified
timeout - operation timeout - -1 if not specified
Throws:
CartagoException

addFocusedArtifacts

public void addFocusedArtifacts(ArtifactDescriptor des)

removeFocusedArtifacts

public void removeFocusedArtifacts(ArtifactDescriptor des)

getCallback

public ICartagoCallback getCallback()

isObserving

public boolean isObserving(ArtifactId id)

updateObsArtifactListWith

public void updateObsArtifactListWith(java.util.List<ObservableArtifactInfo> list,
                                      java.util.List<ObservableArtifactInfo> stopFocus,
                                      java.util.List<ObservableArtifactInfo> newFocus)


>DEIS - University of Bologna