ajanta.pattern
Class Itinerary

java.lang.Object
  |
  +--ajanta.pattern.Itinerary
All Implemented Interfaces:
java.io.Serializable

public class Itinerary
extends java.lang.Object
implements java.io.Serializable

Each agent contains an Itinerary which encapsulates the travel plan of the agent as a Sequence pattern. The basic unit of execution for an agent is the action it performs at each host. This is its computation, which is separate from its migration control. The exit protocol ( defined by its depart method of agent ), which is executed when the agent completes its computation task, requests the Itinerary to choose the next host and migrate to it.

See Also:
Sequence, Serialized Form

Constructor Summary
Itinerary()
           
 
Method Summary
 ajanta.pattern.ItinEntry currentEntry()
          It returns current entry of the Itinerary ( Sequence Pattern )
 boolean done()
          Return current status of the Itinerary
 ajanta.pattern.ItinEntry firstEntry()
           
 void init()
          It resets the Itinerary by calling reset method of Sequence Pattern
 void insert(ajanta.pattern.Pattern p)
          It inserts a Pattern in Sequence Pattern of the Itinerary
 void join()
          It calls join method of Sequence Pattern
 int next(ajanta.server.AgentEnv host)
           
 void print()
          It prints the Itinerary by calling print method of Sequence Pattern
 void scan()
          An empty method
 void terminate()
          It executes next method of Sequence Pattern of the Itinerary hence luanching agent to the next host in the itenerary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Itinerary

public Itinerary()
Method Detail

firstEntry

public ajanta.pattern.ItinEntry firstEntry()
Returns:
It returns the first ItinEntry in the Sequence Pattern of the Itinerary

insert

public void insert(ajanta.pattern.Pattern p)
It inserts a Pattern in Sequence Pattern of the Itinerary

Parameters:
p - Pattern to be inserted

terminate

public void terminate()
It executes next method of Sequence Pattern of the Itinerary hence luanching agent to the next host in the itenerary.


next

public int next(ajanta.server.AgentEnv host)
         throws java.lang.Exception
java.lang.Exception

print

public void print()
It prints the Itinerary by calling print method of Sequence Pattern


init

public void init()
It resets the Itinerary by calling reset method of Sequence Pattern


scan

public void scan()
An empty method


done

public boolean done()
Return current status of the Itinerary


join

public void join()
It calls join method of Sequence Pattern


currentEntry

public ajanta.pattern.ItinEntry currentEntry()
It returns current entry of the Itinerary ( Sequence Pattern )