edu.uwf.kaos.coabsgrid
Class KAoSGridHelper

java.lang.Object
  extended by GridAgentHelper
      extended by edu.uwf.kaos.coabsgrid.KAoSGridHelper
All Implemented Interfaces:
Enforcer

public class KAoSGridHelper
extends GridAgentHelper
implements Enforcer

Enforces domain policies. $Revision: 1.33 $


Constructor Summary
KAoSGridHelper()
           
KAoSGridHelper(java.lang.String agentName)
          KAoS stuff not complete yet in this method! Constructor.
KAoSGridHelper(java.lang.String name, java.lang.String storePass, java.lang.String keyPass)
           
 
Method Summary
 boolean filterMessage(AgentRep senderOrReceiverAgentRep, Message msg)
          Filter incoming and outgoing messages.
 java.util.Vector getControlledActionClasses()
          Get names of the action classes on which policies can be enforced.
 boolean getGuard(java.util.Vector domainNames)
          Obtain the Guard.
protected  void printDebugString(java.lang.String msg)
          Print debug messages.
 void registerAgent(KAoSAgentDescription desc)
           
 void setAgentID(java.lang.String id)
          Set the id of the agent this KAoSGridHelper is associated with.
 void setRegistrationHelper(KAoSAgentRegistrationHelper regHelper)
          Set the KAoSAgentRegistrationHelper this KAoSGridHelper is associated with.
 void testPolicies()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface kaos.policy.enforcement.Enforcer
getName
 

Constructor Detail

KAoSGridHelper

public KAoSGridHelper()
               throws java.io.IOException
Throws:
java.io.IOException

KAoSGridHelper

public KAoSGridHelper(java.lang.String name,
                      java.lang.String storePass,
                      java.lang.String keyPass)
               throws java.io.IOException
Throws:
java.io.IOException

KAoSGridHelper

public KAoSGridHelper(java.lang.String agentName)
               throws java.io.IOException,
                      java.lang.ClassNotFoundException
KAoS stuff not complete yet in this method! Constructor. Instantiates the GridAgent using name agentName. Instantiates a LookupDiscoveryManager. This method does not actually do the agent registration. You need to call one of the registerAgent methods to do that.

Parameters:
agentName - the name of the GridAgentHelper to instantiate
Throws:
java.io.IOException - if there is a problem instantiating the LookupDiscoveryManager
java.lang.ClassNotFoundException
Method Detail

getControlledActionClasses

public java.util.Vector getControlledActionClasses()
Get names of the action classes on which policies can be enforced.

Specified by:
getControlledActionClasses in interface Enforcer
Returns:
Vector Contains strings representing ontology originated names of Action classes.

filterMessage

public boolean filterMessage(AgentRep senderOrReceiverAgentRep,
                             Message msg)
Filter incoming and outgoing messages. This method is called by the KAoSMessageQueue and KAoSWrappedAgentRep. Presently, all domain registration reply messages are sent automatically to the KAoSAgentRegistrationHelper, so the Grid agents never receive them. Returning "true" passes the message, returning "false", blocks it.


setAgentID

public void setAgentID(java.lang.String id)
Set the id of the agent this KAoSGridHelper is associated with.


getGuard

public boolean getGuard(java.util.Vector domainNames)
Obtain the Guard.


registerAgent

public void registerAgent(KAoSAgentDescription desc)
                   throws AlreadyRegisteredException,
                          DirectoryFailure,
                          EnforcerInstantiationException,
                          UnknownConceptException
Throws:
AlreadyRegisteredException
DirectoryFailure
EnforcerInstantiationException
UnknownConceptException

setRegistrationHelper

public void setRegistrationHelper(KAoSAgentRegistrationHelper regHelper)
Set the KAoSAgentRegistrationHelper this KAoSGridHelper is associated with.


testPolicies

public void testPolicies()

printDebugString

protected void printDebugString(java.lang.String msg)
Print debug messages.