SSF.OS.BGP4.Policy
Class AtomicAction

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

public class AtomicAction
extends java.lang.Object

An atomic action applies to a given type of path attribute (of a route), and typically specifies that the attribute be assigned a given value. In the process of applying BGP policy rules, routes are evaluated against certain predicates. When such a predicate is satisfied by a route, an action which is associated with the predicate is performed on that route. Such an action can be composed of multiple atomic actions, such as are represented by this class.

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

Constructor Summary
AtomicAction(int attribval, boolean usingnhi, int actionval, java.lang.String[] vals)
          Constructs an atomic action with the given attribute type, action type, and values.
AtomicAction(java.lang.String attribstr, java.lang.String actionstr, java.util.ArrayList vals)
          Constructs an atomic action with the given attribute type, action type, and values.
AtomicAction(java.lang.String attribstr, java.lang.String actionstr, java.lang.String[] vals)
          Constructs an atomic action with the given path attribute type string, action type string, and values.
 
Method Summary
 void apply_to(Route r)
          Applies this atomic action to the given route, modifying one of its path attributes.
 java.lang.String toString()
          Puts the atomic action into string form suitable for output.
 java.lang.String toString(java.lang.String ind)
          Puts the atomic action 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

AtomicAction

public AtomicAction(int attribval,
                    boolean usingnhi,
                    int actionval,
                    java.lang.String[] vals)
Constructs an atomic action with the given attribute type, action type, and values.

Parameters:
attribval - An integer indicating the path attribute type.
usingnhi - Whether the action uses NHI or traditional addressing.
actionval - An integer indicating the action to be taken.
vals - An array of values to be used in conjunction with the given type of action.

AtomicAction

public AtomicAction(java.lang.String attribstr,
                    java.lang.String actionstr,
                    java.lang.String[] vals)
Constructs an atomic action with the given path attribute type string, action type string, and values.

Parameters:
attribstr - A string indicating the path attribute type.
actionstr - A string indicating the action to be taken.
vals - An array of string values to be used in conjunction with the given type of action.

AtomicAction

public AtomicAction(java.lang.String attribstr,
                    java.lang.String actionstr,
                    java.util.ArrayList vals)
Constructs an atomic action with the given attribute type, action type, and values.

Parameters:
attribstr - A string indicating the path attribute type.
actionstr - A string indicating the action to be taken.
vals - An ArrayList of string values to be used in conjunction with the given type of action.
Method Detail

apply_to

public void apply_to(Route r)
Applies this atomic action to the given route, modifying one of its path attributes.


toString

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

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

toString

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

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