SSF.OS.BGP4.Policy
Class Action

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

public class Action
extends java.lang.Object

Each instance of this class represents an action to be taken with regard to a route which is undergoing the BGP filtering process. Each action is associated with a predicate on such a route, and the pair compose a policy rule clause. A full action is composed of, at the least, a primary action. The primary action is either to permit or deny (a route). If the primary action is to permit, then the action may optionally have multiple additional atomic actions. If the primary action is deny, no atomic actions are allowed. When permitting a route, each of the atomic actions are performed on that route.

See Also:
Rule, Clause, Predicate, AtomicAction

Constructor Summary
Action(boolean perm)
          Builds an action with the given permit status and no atoms.
Action(boolean perm, java.util.ArrayList atomlist)
          Builds an action with the given permit status and given atomic actions.
 
Method Summary
 void add_atom(AtomicAction newatom)
          Adds the given atom to the action.
 boolean apply_to(Route r)
          Applies this action to the given route and returns whether or not the route was permitted.
 java.lang.String toString()
          Puts the action into string form suitable for output.
 java.lang.String toString(java.lang.String ind)
          Puts the 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

Action

public Action(boolean perm)
Builds an action with the given permit status and no atoms.


Action

public Action(boolean perm,
              java.util.ArrayList atomlist)
Builds an action with the given permit status and given atomic actions.

Parameters:
perm - Whether to permit (true) or deny (false) as the primary action.
Method Detail

add_atom

public void add_atom(AtomicAction newatom)
Adds the given atom to the action.


apply_to

public boolean apply_to(Route r)
Applies this action to the given route and returns whether or not the route was permitted.

Returns:
whether or not the route was permitted

toString

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

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

toString

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

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