ajanta.pattern
Class Loop

java.lang.Object
  |
  +--ajanta.pattern.Pattern
        |
        +--ajanta.pattern.PatternCollection
              |
              +--ajanta.pattern.Loop
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
LoopSet

public class Loop
extends PatternCollection

A sequence pattern is composed of an ordered list of Patterns. The traversal of this pattern implies a traversal of the Patterns in the list in sequential order.

See Also:
PatternCollection, Pattern, Serialized Form

Field Summary
protected  long loopInterval
           
 
Fields inherited from class ajanta.pattern.PatternCollection
current, list
 
Fields inherited from class ajanta.pattern.Pattern
action, DONE, FAILED, NOTDONE, status
 
Constructor Summary
Loop()
           
 
Method Summary
protected  int next(ajanta.server.AgentEnv host)
          The pattern traversal is determined by the abstarct method next.
protected  void reset()
          It sets the status of all the patterns in the list to NOTDONE
protected  void scan()
          An empty method
 void setItinFinished()
           
 void setLoopInterval(long interval)
          It calls next method of each pattern in the list in a sequential order
 
Methods inherited from class ajanta.pattern.PatternCollection
currentEntry, firstEntry, insert, join, print
 
Methods inherited from class ajanta.pattern.Pattern
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loopInterval

protected long loopInterval
Constructor Detail

Loop

public Loop()
Method Detail

setLoopInterval

public void setLoopInterval(long interval)
It calls next method of each pattern in the list in a sequential order


setItinFinished

public void setItinFinished()

next

protected int next(ajanta.server.AgentEnv host)
            throws java.net.UnknownHostException
Description copied from class: Pattern
The pattern traversal is determined by the abstarct method next. It captures the notion of next hop in the migration path of the agent. Each pattern has its own semantics to determine the next hop

Specified by:
next in class Pattern
java.net.UnknownHostException

reset

protected void reset()
Description copied from class: PatternCollection
It sets the status of all the patterns in the list to NOTDONE

Overrides:
reset in class PatternCollection

scan

protected void scan()
An empty method

Specified by:
scan in class Pattern