Magentix2  2.1.1
es.upv.dsic.gti_ia.core.MessageFilter Class Reference
Collaboration diagram for es.upv.dsic.gti_ia.core.MessageFilter:

List of all members.

Classes

class  Node

Public Member Functions

 MessageFilter (String expr)
Object clone ()
boolean compareHeaders (ACLMessage msg)
String getExpression ()

Package Attributes

Logger logger = Logger.getLogger(CProcessor.class)

Detailed Description

Class used to represent a filter for messages. By using this filter the user will be able to process only those messages they desire.

Definition at line 15 of file MessageFilter.java.


Constructor & Destructor Documentation

Creates a filter tree from the given expression.

Parameters:
exprA String containing the expression.

Definition at line 74 of file MessageFilter.java.

                                          {
                if (correctExpression(expr)) {
                        this.expr = expr;
                        root = this.createBinaryTree(this.createNodeList());
                }
        }

Member Function Documentation

Creates a replica of this object by calling object.clone() of itself.

Definition at line 84 of file MessageFilter.java.

                             {
                Object obj=null;
                try{
                        obj=super.clone();
                }catch(CloneNotSupportedException ex){
                        logger.error(ex);
                }
                return obj;
        }

The evaluation method. The filter is compared against the message in this method.

Parameters:
msgThe message to compare.
Returns:
True if the message satisfies the filter. False otherwise.

Definition at line 99 of file MessageFilter.java.

                                                      {
                return this.evaluateTree(root, msg);
        }

Gets The expression for which this object can create the filter.

Returns:
The String containing the expression.

Definition at line 107 of file MessageFilter.java.

                                     {
                return expr;
        }

Member Data Documentation

Logger es.upv.dsic.gti_ia.core.MessageFilter.logger = Logger.getLogger(CProcessor.class) [package]

Definition at line 27 of file MessageFilter.java.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables