|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface for a proxy to a context.
Method Summary | |
java.lang.Object |
callAgentMethod(java.lang.String targetAgent,
java.lang.String methodName,
boolean cacheRef,
java.lang.String caller)
This method invokes a method of the agent. |
java.lang.Object |
callAgentMethod(java.lang.String targetAgent,
java.lang.String methodName,
java.lang.Object[] args,
boolean cacheRef,
java.lang.String caller)
This method invokes a method of the agent. |
java.lang.Object |
callAgentMethod(java.lang.String targetAgent,
java.lang.String methodName,
java.lang.Object[] args,
java.lang.String caller)
This method invokes a method of the agent, and caches the reference. |
java.lang.Object |
callAgentMethod(java.lang.String targetAgent,
java.lang.String methodName,
java.lang.String caller)
This method invokes a method of the agent, and caches the reference. |
springs.communication.FutureResult |
callAgentMethodAsynchronously(java.lang.String targetAgent,
java.lang.String methodName,
boolean cacheRef,
java.lang.String caller)
This method invokes a method of the agent asynchronously. |
springs.communication.FutureResult |
callAgentMethodAsynchronously(java.lang.String targetAgent,
java.lang.String methodName,
java.lang.Object[] args,
boolean cacheRef,
java.lang.String caller)
This method invokes a method of the agent asynchronously. |
springs.communication.FutureResult |
callAgentMethodAsynchronously(java.lang.String targetAgent,
java.lang.String methodName,
java.lang.Object[] args,
java.lang.String caller)
This method invokes a method of the agent asynchronously, and caches the reference. |
springs.communication.FutureResult |
callAgentMethodAsynchronously(java.lang.String targetAgent,
java.lang.String methodName,
java.lang.String caller)
This method invokes a method of the agent asynchronously, and caches the reference. |
void |
checkpoint(springs.agent.SpringsAgent agent)
Checkpoints the agent. |
void |
createAgent(springs.agent.SpringsAgent agent,
java.lang.String agentName)
Creates an agent. |
void |
deleteAgent(springs.agent.SpringsAgent agent)
Deletes the given agent from the system. |
springs.context.ContextAddress |
getContextAddress()
Gets the context address. |
boolean |
isSuspended(springs.agent.SpringsAgent agent)
Obtains if the agent is suspended. |
void |
moveAgent(springs.agent.SpringsAgent agent,
springs.context.ContextAddress contextAddress)
Moves an agent. |
void |
sendAgent(springs.agent.SpringsAgent agent,
springs.context.ContextAddress contextAddress,
boolean isMoving)
Sends an agent. |
springs.communication.FutureResult |
sendAsynchronousMessage(java.lang.String targetAgent,
springs.communication.Message message,
boolean cacheRef,
java.lang.String caller)
This method sends a message to the agent, asynchronously. |
java.lang.Object |
sendMessage(java.lang.String targetAgent,
springs.communication.Message message,
boolean asynchronous,
boolean cacheRef,
java.lang.String caller)
This method sends a message to the agent. |
java.lang.Object |
sendMessage(java.lang.String targetAgent,
springs.communication.Message message,
boolean cacheRef,
java.lang.String caller)
This method sends a message to the agent, synchronously. |
void |
suspend(springs.agent.SpringsAgent agent)
Suspends the agent execution. |
Method Detail |
public void createAgent(springs.agent.SpringsAgent agent, java.lang.String agentName) throws CreationException
agent
- the agent.agentName
- the name of the agent.
throws
- CreationException if error.
CreationException
SpringsAgent
,
String
,
CreationException
public void deleteAgent(springs.agent.SpringsAgent agent) throws RemovalException
agent
- the agent
throws
- RemovalException if error.
RemovalException
SpringsAgent
,
RemovalException
public springs.context.ContextAddress getContextAddress()
ContextAddress
public void sendAgent(springs.agent.SpringsAgent agent, springs.context.ContextAddress contextAddress, boolean isMoving) throws AgentMovementException
agent
- the agent.contextAddress
- the target context.isMoving
- a boolean indicating if the agent is sent because of a movement from another
context.
AgentMovementException
- if the agent cannot be moved to the target address.SpringsAgent
,
ContextAddress
,
AgentMovementException
public void moveAgent(springs.agent.SpringsAgent agent, springs.context.ContextAddress contextAddress) throws AgentMovementException
agent
- the agent.contextAddress
- the target context.
AgentMovementException
- if the agent cannot be moved to the target address.SpringsAgent
,
ContextAddress
,
AgentMovementException
public boolean isSuspended(springs.agent.SpringsAgent agent)
agent
- the agent.
SpringsAgent
public void suspend(springs.agent.SpringsAgent agent)
agent
- the agent.SpringsAgent
public void checkpoint(springs.agent.SpringsAgent agent)
agent
- the agent.SpringsAgent
public java.lang.Object callAgentMethod(java.lang.String targetAgent, java.lang.String methodName, java.lang.Object[] args, boolean cacheRef, java.lang.String caller) throws MethodCallException, CommunicationException
targetAgent
- the name of the target agent.methodName
- the name of the method.args
- the arguments to the method.cacheRef
- a boolean indicating whether the reference to the agent should be cached.caller
- the name of the caller agent.
MethodCallException
- if the invocation fails.
CommunicationException
- if there is a communication error.MethodCallException
,
CommunicationException
,
String
,
Object
public java.lang.Object callAgentMethod(java.lang.String targetAgent, java.lang.String methodName, java.lang.Object[] args, java.lang.String caller) throws MethodCallException, CommunicationException
targetAgent
- the name of the target agent.methodName
- the name of the method.args
- the arguments to the method.caller
- the name of the caller agent.
MethodCallException
- if the invocation fails.
CommunicationException
- if there is a communication error.MethodCallException
,
CommunicationException
,
String
,
Object
public java.lang.Object callAgentMethod(java.lang.String targetAgent, java.lang.String methodName, boolean cacheRef, java.lang.String caller) throws MethodCallException, CommunicationException
targetAgent
- the name of the target agent.methodName
- the name of the method.cacheRef
- a boolean indicating whether the reference to the agent should be cached.caller
- the name of the caller agent.
MethodCallException
- if the invocation fails.
CommunicationException
- if there is a communication error.CommunicationException
,
MethodCallException
,
String
,
Object
public java.lang.Object callAgentMethod(java.lang.String targetAgent, java.lang.String methodName, java.lang.String caller) throws MethodCallException, CommunicationException
targetAgent
- the name of the target agent.methodName
- the name of the method.caller
- the name of the caller agent.
MethodCallException
- if the invocation fails.
CommunicationException
- if there is a communication error.CommunicationException
,
MethodCallException
,
String
,
Object
public springs.communication.FutureResult callAgentMethodAsynchronously(java.lang.String targetAgent, java.lang.String methodName, java.lang.Object[] args, boolean cacheRef, java.lang.String caller) throws AgentReferenceException
targetAgent
- the name of the target agent.methodName
- the name of the method.args
- the arguments to the method.cacheRef
- a boolean indicating whether the reference to the agent should be cached.caller
- the name of the caller agent.
AgentReferenceException
- if error.FutureResult
,
AgentReferenceException
,
String
,
Object
public springs.communication.FutureResult callAgentMethodAsynchronously(java.lang.String targetAgent, java.lang.String methodName, java.lang.Object[] args, java.lang.String caller) throws AgentReferenceException
targetAgent
- the name of the target agent.methodName
- the name of the method.args
- the arguments to the method.caller
- the name of the caller agent.
AgentReferenceException
- if error.FutureResult
,
AgentReferenceException
,
String
,
Object
public springs.communication.FutureResult callAgentMethodAsynchronously(java.lang.String targetAgent, java.lang.String methodName, boolean cacheRef, java.lang.String caller) throws AgentReferenceException
targetAgent
- the name of the target agent.methodName
- the name of the method.cacheRef
- a boolean indicating whether the reference to the agent should be cached.caller
- the name of the caller agent.
AgentReferenceException
- if error.FutureResult
,
AgentReferenceException
,
String
,
Object
public springs.communication.FutureResult callAgentMethodAsynchronously(java.lang.String targetAgent, java.lang.String methodName, java.lang.String caller) throws AgentReferenceException
targetAgent
- the name of the target agent.methodName
- the name of the method.caller
- the name of the caller agent.
AgentReferenceException
- if error.FutureResult
,
AgentReferenceException
,
String
,
Object
public java.lang.Object sendMessage(java.lang.String targetAgent, springs.communication.Message message, boolean cacheRef, java.lang.String caller) throws CommunicationException
targetAgent
- the name of the target agent.message
- the message.cacheRef
- a boolean indicating whether the reference to the agent should be cached.caller
- the name of the caller agent.
CommunicationException
- if there is a communication error.Message
,
if there is a communication error.
public springs.communication.FutureResult sendAsynchronousMessage(java.lang.String targetAgent, springs.communication.Message message, boolean cacheRef, java.lang.String caller) throws CommunicationException
targetAgent
- the name of the target agent.message
- the message.cacheRef
- a boolean indicating whether the reference to the agent should be cached.caller
- the name of the caller agent.
CommunicationException
- if there is a communication error.FutureResult
,
Message
public java.lang.Object sendMessage(java.lang.String targetAgent, springs.communication.Message message, boolean asynchronous, boolean cacheRef, java.lang.String caller) throws CommunicationException
targetAgent
- the name of the target agent.message
- the message.asynchronous
- a boolean indicating whether the message should be sent asynchronously
or not.cacheRef
- a boolean indicating whether the reference to the agent should be cached.caller
- the name of the caller agent.
CommunicationException
- if there is a communication error.Message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |