SSF.OS.BGP4.Policy
Class AtomicPredicate

java.lang.Object
  |
  +--SSF.OS.BGP4.Policy.AtomicPredicate

public class AtomicPredicate
extends java.lang.Object

An atomic predicate applies to a given type of route attribute (typically the route destination or a BGP path attribute). In the process of applying BGP policy rules, attribute instances are evaluated against such predicates to determine if they satisfy them.

See Also:
Attribute, Rule, Clause, Action, Predicate, AtomicPredicate

Constructor Summary
AtomicPredicate(int attribval, java.lang.String matcher)
          Constructs and atomic predicate given a route attribute type as an integer and a string used for matching certain values of that type of route attribute.
AtomicPredicate(java.lang.String attribstr, java.lang.String matcher)
          Constructs an atomic predicate given a route attribute type as a string and a string used for matching certain values of that type of route attribute.
 
Method Summary
 boolean apply_to(Route r)
          Applies this atomic predicate to the given route and returns true only if it matches.
 java.lang.String toString()
          Puts the atomic predicate into string form suitable for output.
 java.lang.String toString(java.lang.String ind)
          Puts the atomic predicate into string form suitable for output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AtomicPredicate

public AtomicPredicate(int attribval,
                       java.lang.String matcher)
Constructs and atomic predicate given a route attribute type as an integer and a string used for matching certain values of that type of route attribute.

Parameters:
attribval - A string indicating the route attribute type.
matcher - A string for matching route attribute values.

AtomicPredicate

public AtomicPredicate(java.lang.String attribstr,
                       java.lang.String matcher)
Constructs an atomic predicate given a route attribute type as a string and a string used for matching certain values of that type of route attribute.

Parameters:
attribstr - A string indicating the route attribute type.
matcher - A string for matching route attribute values.
Method Detail

apply_to

public boolean apply_to(Route r)
Applies this atomic predicate to the given route and returns true only if it matches.

Returns:
whether or not the atomic predicate matches the route

toString

public java.lang.String toString()
Puts the atomic predicate into string form suitable for output.

Overrides:
toString in class java.lang.Object
Returns:
the atomic predicate in string form

toString

public java.lang.String toString(java.lang.String ind)
Puts the atomic predicate into string form suitable for output.

Parameters:
ind - A string to use as a prefix for each line in the string.
Returns:
the atomic predicate in string form