SSF.OS.BGP4.Policy
Class Clause

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

public class Clause
extends java.lang.Object

Each instance of this class represents a clause in a BGP policy rule. A clause maps a predicate (on a route) to an action.

See Also:
Predicate, Action

Constructor Summary
Clause(Predicate p, Action a)
          The default constructor.
 
Method Summary
 boolean[] apply_to(Route r)
          Applies the predicate of this clause to the given route.
 java.lang.String toString()
          Puts the clause into string form suitable for output.
 java.lang.String toString(java.lang.String ind)
          Puts the clause 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

Clause

public Clause(Predicate p,
              Action a)
The default constructor.

Method Detail

apply_to

public boolean[] apply_to(Route r)
Applies the predicate of this clause to the given route. If it matches, then the associated action is applied to the route.

Returns:
an array of two booleans indicating (1) whether or not the predicate matched the route and (2) if the predicate matched, whether or not the action resulted in the route being permitted

toString

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

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

toString

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

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