kaos.policy.enforcement.filter
Class PermissionFilter

java.lang.Object
  extended by kaos.policy.enforcement.filter.PermissionFilter
Direct Known Subclasses:
DomainNameFilter

public abstract class PermissionFilter
extends java.lang.Object

PermissionFilter Object that encapsulates a mechanism by which it can be determined whether a given KAoS Msg 'passes' or not. The filter conditions use objects of class Msg, but this use of Msg has nothing to do with the objects *being* filtered; Msg is just a convenient way of doing it. Requires:

Modifications:

See Also:
"KAoS Agent Programmer's Guide" $Revision: 1.1.1.1 $

Field Summary
protected  Msg currentFilterConditions_
           
 
Constructor Summary
PermissionFilter(Msg initialFilterConditions)
          Constructor.
 
Method Summary
 void addFilterConditions(java.lang.String conditionName, java.lang.Object conditionValue)
          Add the given conditions to the list.
abstract  boolean messagePasses(Msg testMsg)
          This is the primary purpose of this class: given the current state of this filter object, does the given Msg 'pass', or not?
 void setFilterConditions(java.lang.String conditionName, java.lang.Object conditionValue)
          Set the conditions from scratch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentFilterConditions_

protected Msg currentFilterConditions_
Constructor Detail

PermissionFilter

public PermissionFilter(Msg initialFilterConditions)
Constructor. Set the initial filter conditions.

Method Detail

messagePasses

public abstract boolean messagePasses(Msg testMsg)
This is the primary purpose of this class: given the current state of this filter object, does the given Msg 'pass', or not?


addFilterConditions

public void addFilterConditions(java.lang.String conditionName,
                                java.lang.Object conditionValue)
Add the given conditions to the list.


setFilterConditions

public void setFilterConditions(java.lang.String conditionName,
                                java.lang.Object conditionValue)
Set the conditions from scratch.