unsw.cse.mica.blackboard.secure
Interface BlackboardSecurityManager

All Known Implementing Classes:
SimpleBlackboardSecurityManager

public interface BlackboardSecurityManager

An interface that provides methods for checking an agents class and whether an agent is authorised to read/write a mob.

Author:
mmcgill

Field Summary
static int ACTION_READMOB
           
static int ACTION_WRITEMOB
           
 
Method Summary
 java.lang.String classifyAgent(java.lang.String proposedName, java.lang.String password)
          Checks the classification of an agent.
 boolean isAuthorised(java.lang.String agentClassification, int action, Mob mob)
          Checks whether an agent can read/write a given mob.
 

Field Detail

ACTION_READMOB

static final int ACTION_READMOB
See Also:
Constant Field Values

ACTION_WRITEMOB

static final int ACTION_WRITEMOB
See Also:
Constant Field Values
Method Detail

classifyAgent

java.lang.String classifyAgent(java.lang.String proposedName,
                               java.lang.String password)
                               throws AgentClassificationException
Checks the classification of an agent.

Parameters:
proposedName - the name the agent is attempting to connect with
password - the password the agent is using to connect
Returns:
the class the agent is assigned to
Throws:
AgentClassificationException - if the agent cannot be classified

isAuthorised

boolean isAuthorised(java.lang.String agentClassification,
                     int action,
                     Mob mob)
Checks whether an agent can read/write a given mob.

Parameters:
agentClassification - the agents classification
action - whether the agent is attempting to read/write
mob - the mob being read/written
Returns:
true if the agent is authorised else false