ajanta.server
Interface AServer

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
AgentServer

public interface AServer
extends java.rmi.Remote

The remotely callable interface supported by all agent servers. Unauthenticated versions of recall, retract and terminate are currently included in the interface for testing/convenience only. They will be removed from here, and changed to private functions within the AgentServer class.


Method Summary
 ajanta.util.Ticket authenticate(ajanta.naming.URN caller, int nonce, ajanta.util.ContextObject context)
          It is used to obtain ticket from this server from a remote site.
 java.lang.String ping()
          Returns Agent Server Status.
 void recall(ajanta.naming.URN target, ajanta.naming.URN reportTo, ajanta.util.Ticket t)
          It is used to recall an agent ...which basically allow an agent to complete its task at the current server and upon completion migate it to the reportTo server ( but it aborts its prespecifed itinerary).
 void recall(ajanta.naming.URN target, ajanta.naming.URN caller, ajanta.naming.URN reportTo)
          It is used to recall an agent ...which basically allow an agent to complete its task at the current server ( but it aborts its prespecifed itinerary) and upon completion migate it to the reportTo server.
 void retract(ajanta.naming.URN target, ajanta.naming.URN reportTo, ajanta.util.Ticket t)
          It is used to retract an agent ...it preempts the agent from its current task and its prespecifed itinerary.
 void retract(ajanta.naming.URN target, ajanta.naming.URN caller, ajanta.naming.URN reportTo)
          It is used to retract an agent ...it preempts the agent from its current task and its prespecified itinerary.
 void terminate(ajanta.naming.URN target)
          It is used to abort an agent ...it immediately kill the agent.
 void terminate(ajanta.naming.URN target, ajanta.util.Ticket t)
          It is used to abort an agent ...it immediately kills the agent.
 ajanta.naming.URN whoAreYou()
          A simple method in the AServer interface, for obtaining an agent server's URN
 

Method Detail

whoAreYou

public ajanta.naming.URN whoAreYou()
                            throws java.rmi.RemoteException
A simple method in the AServer interface, for obtaining an agent server's URN

java.rmi.RemoteException

authenticate

public ajanta.util.Ticket authenticate(ajanta.naming.URN caller,
                                       int nonce,
                                       ajanta.util.ContextObject context)
                                throws java.rmi.RemoteException
It is used to obtain ticket from this server from a remote site.

Parameters:
caller - caller identity( URN )
nonce - random number used as challenge
java.rmi.RemoteException

recall

public void recall(ajanta.naming.URN target,
                   ajanta.naming.URN caller,
                   ajanta.naming.URN reportTo)
            throws java.rmi.RemoteException
It is used to recall an agent ...which basically allow an agent to complete its task at the current server ( but it aborts its prespecifed itinerary) and upon completion migate it to the reportTo server. This do not involve authentication and will be deprecated in future release.

Parameters:
target - URN of the agent to be relocated
reportTo - URN of the entity to whom agent has to report
java.rmi.RemoteException

recall

public void recall(ajanta.naming.URN target,
                   ajanta.naming.URN reportTo,
                   ajanta.util.Ticket t)
            throws java.rmi.RemoteException,
                   java.security.InvalidKeyException,
                   java.security.SignatureException
It is used to recall an agent ...which basically allow an agent to complete its task at the current server and upon completion migate it to the reportTo server ( but it aborts its prespecifed itinerary). Recaller must authenticate himself with the remote server inorder to recall the agent.Only owner, creator or gurdian are allowed to recall an agent.
     AServer targetServer = getAgentCurrentServer( agentURN );
     Ticket ticket = remoteServerTicket ( targetServer, myURN , 3000, dsa_priv );
     recall (agentURN , myURN , ticket )
 

Parameters:
target - URN of the agent to be relocated
reportTo - URN of the entity to whom agent has to report
t - ticket obtained from the remote server
java.rmi.RemoteException
java.security.InvalidKeyException
java.security.SignatureException

retract

public void retract(ajanta.naming.URN target,
                    ajanta.naming.URN caller,
                    ajanta.naming.URN reportTo)
             throws java.rmi.RemoteException
It is used to retract an agent ...it preempts the agent from its current task and its prespecified itinerary. Then immediately migate it to the reportTo server. This do not involve authentication and will be deprecated in future release.

Parameters:
target - URN of the agent to be relocated
reportTo - URN of the entity to whom agent has to report
java.rmi.RemoteException

retract

public void retract(ajanta.naming.URN target,
                    ajanta.naming.URN reportTo,
                    ajanta.util.Ticket t)
             throws java.rmi.RemoteException,
                    java.security.InvalidKeyException,
                    java.security.SignatureException
It is used to retract an agent ...it preempts the agent from its current task and its prespecifed itinerary. Then migate the agent to the reportTo server. Retractor must authenticate himself with the remote server inorder to retract the agent.Only owner, creator or gurdian are allowed to retract an agent.
     AServer targetServer = getAgentCurrentServer( agentURN );
     Ticket ticket = remoteServerTicket ( targetServer, myURN , 3000, dsa_priv );
     retract (agentURN , myURN , ticket )
 

Parameters:
target - URN of the agent to be retracted
reportTo - URN of the entity to whom agent has to report
t - ticket obtained from the remote server
java.rmi.RemoteException
java.security.InvalidKeyException
java.security.SignatureException

terminate

public void terminate(ajanta.naming.URN target)
               throws java.rmi.RemoteException
It is used to abort an agent ...it immediately kill the agent. This do not involve authentication and will be deprecated in future release.

Parameters:
target - URN of the agent to be terminated
java.rmi.RemoteException

terminate

public void terminate(ajanta.naming.URN target,
                      ajanta.util.Ticket t)
               throws java.rmi.RemoteException,
                      java.security.InvalidKeyException,
                      java.security.SignatureException
It is used to abort an agent ...it immediately kills the agent. Caller must authenticate himself with the remote server inorder to terminate the agent.Only owner, creator or gurdian are allowed to terminate an agent.
     AServer targetServer = getAgentCurrentServer( agentURN );
     Ticket ticket = remoteServerTicket ( targetServer, myURN , 3000, dsa_priv );
     terminate (agentURN  , ticket )
 

Parameters:
target - URN of the agent to be terminated
java.rmi.RemoteException
java.security.InvalidKeyException
java.security.SignatureException

ping

public java.lang.String ping()
                      throws java.rmi.RemoteException
Returns Agent Server Status. Currently "alive".

java.rmi.RemoteException