org.almendra.janet.cas.agents
Class MultiAgentProxy

java.lang.Object
  extended by org.almendra.janet.cas.agents.AbstractAgentProxy
      extended by org.almendra.janet.cas.agents.MultiAgentProxy
All Implemented Interfaces:
IAgentProxy

public class MultiAgentProxy
extends AbstractAgentProxy
implements IAgentProxy

Author:
Oliver

Field Summary
protected  java.util.List agentProxies
           
 
Fields inherited from class org.almendra.janet.cas.agents.AbstractAgentProxy
logger, originNodeName
 
Constructor Summary
MultiAgentProxy()
          Creates a new MultiAgentProxy object.
MultiAgentProxy(java.util.List agentProxies)
           
 
Method Summary
 void accept(CommandEnvelope env)
           
 void accept(ICommand command)
           
 void accept(ICommand command, Acknowledge ack)
           
 void accept(ICommand command, FutureResult futureResult)
          Send commmand to an agent expecting a result to be sent back.
 void accept(ICommand command, IHistorizableCallbackHandler handler)
           
 void accept(ICommand command, int kind)
           
 void accept(IWorkLoadBalancingCommand command)
           
 void accept(IWorkLoadBalancingCommand command, Acknowledge ack)
           
 void accept(IWorkLoadBalancingCommand command, FutureResult futureResult)
          Send commmand to an agent expecting a result to be sent back.
 void accept(IWorkLoadBalancingCommand command, IHistorizableCallbackHandler handler)
           
 void accept(IWorkLoadSharingCommand command)
           
 void accept(IWorkLoadSharingCommand command, Acknowledge ack)
           
 void accept(IWorkLoadSharingCommand command, FutureResult futureResult)
          Send commmand to an agent expecting a result to be sent back.
 void accept(IWorkLoadSharingCommand command, IHistorizableCallbackHandler handler)
           
 void add(IAgentProxy agentProxy)
           
 boolean remove(IAgentProxy agentProxy)
           
protected  AgentPath replyPathSameAgent()
           
 int size()
           
 
Methods inherited from class org.almendra.janet.cas.agents.AbstractAgentProxy
checkValidity, getLogger, getOriginNodeName, setLogger, setOriginNodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

agentProxies

protected java.util.List agentProxies
Constructor Detail

MultiAgentProxy

public MultiAgentProxy()
Creates a new MultiAgentProxy object.


MultiAgentProxy

public MultiAgentProxy(java.util.List agentProxies)
Method Detail

accept

public void accept(ICommand command)
            throws java.rmi.RemoteException,
                   InvalidCommandException
Specified by:
accept in interface IAgentProxy
Specified by:
accept in class AbstractAgentProxy
Throws:
java.rmi.RemoteException
InvalidCommandException

add

public void add(IAgentProxy agentProxy)

remove

public boolean remove(IAgentProxy agentProxy)

size

public int size()
Specified by:
size in interface IAgentProxy
Returns:

accept

public void accept(ICommand command,
                   Acknowledge ack)
            throws java.rmi.RemoteException,
                   InvalidCommandException
Specified by:
accept in interface IAgentProxy
Specified by:
accept in class AbstractAgentProxy
Parameters:
command -
ackHandler -
Throws:
java.rmi.RemoteException
InvalidCommandException

accept

public void accept(ICommand command,
                   FutureResult futureResult)
            throws java.lang.IllegalArgumentException
Send commmand to an agent expecting a result to be sent back.

Specified by:
accept in interface IAgentProxy
Specified by:
accept in class AbstractAgentProxy
Parameters:
command - to be sent to another agent
replyToAgentPath - path to agent that should receive result
Throws:
java.lang.IllegalArgumentException

accept

public void accept(ICommand command,
                   IHistorizableCallbackHandler handler)
            throws java.rmi.RemoteException,
                   InvalidCommandException
Specified by:
accept in interface IAgentProxy
Specified by:
accept in class AbstractAgentProxy
Throws:
java.rmi.RemoteException
InvalidCommandException

replyPathSameAgent

protected AgentPath replyPathSameAgent()
Specified by:
replyPathSameAgent in class AbstractAgentProxy
Returns:

accept

public void accept(CommandEnvelope env)
            throws java.rmi.RemoteException,
                   InvalidCommandException
Specified by:
accept in interface IAgentProxy
Throws:
java.rmi.RemoteException
InvalidCommandException

accept

public void accept(IWorkLoadSharingCommand command)
            throws java.rmi.RemoteException,
                   InvalidCommandException
Specified by:
accept in interface IAgentProxy
Throws:
java.rmi.RemoteException
InvalidCommandException

accept

public void accept(IWorkLoadBalancingCommand command)
            throws java.rmi.RemoteException,
                   InvalidCommandException
Specified by:
accept in interface IAgentProxy
Throws:
java.rmi.RemoteException
InvalidCommandException

accept

public void accept(IWorkLoadSharingCommand command,
                   Acknowledge ack)
            throws java.rmi.RemoteException,
                   InvalidCommandException
Specified by:
accept in interface IAgentProxy
Throws:
java.rmi.RemoteException
InvalidCommandException

accept

public void accept(IWorkLoadSharingCommand command,
                   FutureResult futureResult)
            throws java.lang.IllegalArgumentException,
                   java.rmi.RemoteException,
                   InvalidCommandException
Description copied from interface: IAgentProxy
Send commmand to an agent expecting a result to be sent back.

Specified by:
accept in interface IAgentProxy
Parameters:
command - to be sent to another agent
Throws:
java.lang.IllegalArgumentException
java.rmi.RemoteException
InvalidCommandException

accept

public void accept(IWorkLoadBalancingCommand command,
                   IHistorizableCallbackHandler handler)
            throws java.rmi.RemoteException,
                   InvalidCommandException
Specified by:
accept in interface IAgentProxy
Throws:
java.rmi.RemoteException
InvalidCommandException

accept

public void accept(IWorkLoadBalancingCommand command,
                   Acknowledge ack)
            throws java.rmi.RemoteException,
                   InvalidCommandException
Specified by:
accept in interface IAgentProxy
Throws:
java.rmi.RemoteException
InvalidCommandException

accept

public void accept(IWorkLoadBalancingCommand command,
                   FutureResult futureResult)
            throws java.lang.IllegalArgumentException,
                   java.rmi.RemoteException,
                   InvalidCommandException
Description copied from interface: IAgentProxy
Send commmand to an agent expecting a result to be sent back.

Specified by:
accept in interface IAgentProxy
Parameters:
command - to be sent to another agent
Throws:
java.lang.IllegalArgumentException
java.rmi.RemoteException
InvalidCommandException

accept

public void accept(IWorkLoadSharingCommand command,
                   IHistorizableCallbackHandler handler)
            throws java.rmi.RemoteException,
                   InvalidCommandException
Specified by:
accept in interface IAgentProxy
Throws:
java.rmi.RemoteException
InvalidCommandException

accept

public void accept(ICommand command,
                   int kind)
            throws java.rmi.RemoteException,
                   InvalidCommandException
Specified by:
accept in interface IAgentProxy
Throws:
java.rmi.RemoteException
InvalidCommandException