All Packages Class Hierarchy This Package Previous Next Index
Class ajanta.pattern.Selection
java.lang.Object
|
+----ajanta.pattern.Pattern
|
+----ajanta.pattern.PatternCollection
|
+----ajanta.pattern.Selection
- public class Selection
- extends PatternCollection
This emulates conditional control structure. The traversal of this pattern
implies choosing one pattern from the list based on a user-defined choosePattern
method. This choice could be made on basis of the agent's state or the
hosts to be visited in the pattern. Strategies for making a selection
could be randomized, priority-based, etc. This pattern is also useful
in selecting alternate paths in case of failures, like unavailability
of hosts.
-
Selection()
-
-
choosePattern()
- It will determine the location of the next Pattern in the list
by modifying value of current .
-
next(AgentEnv)
- Based on a user-defined choosePattern method it find next
pattern to be executed and call next on that.
-
scan()
- An empty method ....can overridden in derived classes
Selection
public Selection()
next
protected int next(AgentEnv host) throws UnknownHostException
- Based on a user-defined choosePattern method it find next
pattern to be executed and call next on that. This is performed
as long as there is some patterns which has not be DONE.
- Overrides:
- next in class Pattern
scan
protected void scan()
- An empty method ....can overridden in derived classes
- Overrides:
- scan in class Pattern
choosePattern
protected int choosePattern()
- It will determine the location of the next Pattern in the list
by modifying value of current . It is application specific
method and should be appropraitely overridden. Currenyly it provides
sequential order
All Packages Class Hierarchy This Package Previous Next Index