ajanta.pattern
Class ItinEntry

java.lang.Object
  |
  +--ajanta.pattern.Pattern
        |
        +--ajanta.pattern.ItinEntry
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class ItinEntry
extends Pattern

The basic unit of Migartion is defined in terms of ItinEntry. It is a singleton pattern. It specifies the destination server to migrate to, and the action to be performed at the host.

See Also:
Serialized Form

Field Summary
 ajanta.naming.URN hostURN
          URN of the destination server
 
Fields inherited from class ajanta.pattern.Pattern
action, DONE, FAILED, NOTDONE, status
 
Constructor Summary
ItinEntry()
          It initializes hostURN and action to null
ItinEntry(ajanta.naming.URN name, java.lang.String method, java.lang.Class[] formal, java.lang.Object[] actual)
           
 
Method Summary
 ajanta.pattern.ItinEntry currentEntry()
           
protected  int next(ajanta.server.AgentEnv host)
          If the status of the ItinEntry is not equal to DONE then it migrates the agent to the specified host using AgentEnv go primitive
 void print()
          Print destination server name and the status of the ItinEntry
protected  void reset()
          Set the status of the ItinEntry to NOTDONE
protected  void scan()
          Empty method...to be defined in derived classes
 java.lang.String toString()
          return name of the destination server
 
Methods inherited from class ajanta.pattern.Pattern
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hostURN

public ajanta.naming.URN hostURN
URN of the destination server

Constructor Detail

ItinEntry

public ItinEntry()
It initializes hostURN and action to null


ItinEntry

public ItinEntry(ajanta.naming.URN name,
                 java.lang.String method,
                 java.lang.Class[] formal,
                 java.lang.Object[] actual)
Parameters:
name - URN of the destination server
method - name of the method to be executed
formal - array of method's parameter classes
actual - array of method's parameter objects
Method Detail

next

protected int next(ajanta.server.AgentEnv host)
            throws java.net.UnknownHostException
If the status of the ItinEntry is not equal to DONE then it migrates the agent to the specified host using AgentEnv go primitive

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

reset

protected void reset()
Set the status of the ItinEntry to NOTDONE

Specified by:
reset in class Pattern

scan

protected void scan()
Empty method...to be defined in derived classes

Specified by:
scan in class Pattern

toString

public java.lang.String toString()
return name of the destination server

Overrides:
toString in class java.lang.Object

currentEntry

public ajanta.pattern.ItinEntry currentEntry()
Returns:
if the status is not equal to DONE then return reference to itself( this ) else return null

print

public void print()
Print destination server name and the status of the ItinEntry

Specified by:
print in class Pattern