unsw.cse.mica.agent.transport
Class AbstractAgentProtocol.Reply

java.lang.Object
  extended by unsw.cse.mica.agent.transport.AbstractAgentProtocol.Reply
Enclosing class:
AbstractAgentProtocol

public class AbstractAgentProtocol.Reply
extends java.lang.Object

An encapsulation of a reply from the blackboards in response to an action.

Author:
jhw

Field Summary
 java.util.List mobs
           
 java.lang.String msg
           
 TypeManager tm
           
 java.lang.String type
           
static java.lang.String TYPE_CONNECT
           
static java.lang.String TYPE_MOBSEARCH
           
static java.lang.String TYPE_READMOB
           
static java.lang.String TYPE_STATUS
           
static java.lang.String TYPE_TYPEMANAGER
           
static java.lang.String TYPE_WRITEMOB
           
 
Constructor Summary
AbstractAgentProtocol.Reply(java.lang.String type, java.util.List mobs)
          Create a reply containing a reply type and a message
AbstractAgentProtocol.Reply(java.lang.String type, java.lang.String msg)
          Create a reply containing a reply type and a message
AbstractAgentProtocol.Reply(java.lang.String type, java.lang.String msg, Mob mob)
          Create a reply containing a reply type and a message
AbstractAgentProtocol.Reply(java.lang.String type, TypeManager tm)
          Create a reply containing a reply type and a type manager
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_STATUS

public static final java.lang.String TYPE_STATUS
See Also:
Constant Field Values

TYPE_CONNECT

public static final java.lang.String TYPE_CONNECT
See Also:
Constant Field Values

TYPE_WRITEMOB

public static final java.lang.String TYPE_WRITEMOB
See Also:
Constant Field Values

TYPE_READMOB

public static final java.lang.String TYPE_READMOB
See Also:
Constant Field Values

TYPE_MOBSEARCH

public static final java.lang.String TYPE_MOBSEARCH
See Also:
Constant Field Values

TYPE_TYPEMANAGER

public static final java.lang.String TYPE_TYPEMANAGER
See Also:
Constant Field Values

type

public java.lang.String type

msg

public java.lang.String msg

mobs

public java.util.List mobs

tm

public TypeManager tm
Constructor Detail

AbstractAgentProtocol.Reply

public AbstractAgentProtocol.Reply(java.lang.String type,
                                   java.lang.String msg)
Create a reply containing a reply type and a message

Parameters:
type - must be TYPE_STATUS, TYPE_CONNECT or TYPE_WRITEMOB
msg - the message returned from the blackboard

AbstractAgentProtocol.Reply

public AbstractAgentProtocol.Reply(java.lang.String type,
                                   java.lang.String msg,
                                   Mob mob)
Create a reply containing a reply type and a message

Parameters:
type - must be TYPE_READMOB
msg - the message returned from the blackboard
mob - the mob returned from the blackboard

AbstractAgentProtocol.Reply

public AbstractAgentProtocol.Reply(java.lang.String type,
                                   java.util.List mobs)
Create a reply containing a reply type and a message

Parameters:
type - must be TYPE_MOBSEARCH
mobs - the list of mobs returned from the blackboard

AbstractAgentProtocol.Reply

public AbstractAgentProtocol.Reply(java.lang.String type,
                                   TypeManager tm)
Create a reply containing a reply type and a type manager

Parameters:
type - must be TYPE_TYPEMANAGER
tm - the type manager obtained from the blackboard