ajanta.server
Class NRAccess

java.lang.Object
  |
  +--ajanta.server.NRAccess

public class NRAccess
extends java.lang.Object

Client side module to access Name Registry. All these client side call are same as name registry interface, except tickets are handled by this module This class syncronizesz all call to the name registry


Constructor Summary
NRAccess(ajanta.naming.URN serverURN, java.security.PrivateKey dsa_p, java.lang.String nameregURL)
          constructor
 
Method Summary
 ajanta.util.Ticket authenticate(ajanta.naming.URN caller, int nonce, ajanta.util.ContextObject context)
          gets the initial ticket from name registry
 void bind(ajanta.naming.URN urn, ajanta.naming.NREntry entry)
          Binds the URN with with the specified entry
 java.security.cert.X509Certificate getCertificate(ajanta.naming.URN urn)
           
 java.net.URL getCodeBaseURL(ajanta.naming.URN urn)
          returns the code base location of an agent server.
 java.security.PublicKey getEncryptKey(ajanta.naming.URN urn)
          returns the public key encryption key pair
 java.security.cert.X509Certificate getNRCertificate()
           
 java.net.URL getURL(ajanta.naming.URN urn)
          Returs the first entry of the url list for this entry.
 java.util.Vector getURLs(ajanta.naming.URN urn)
          return the locations associated with this name
 java.security.PublicKey getVerifyKey(ajanta.naming.URN urn)
          returns the verification key for the signature key pair
 ajanta.naming.NREntry lookup(ajanta.naming.URN urn)
          Returns the NREntry object associated with the specified name in the registry.
 void rebind(ajanta.naming.URN urn, ajanta.naming.NREntry entry)
          Rebinds the URN with with the specified entry, replacing any existing binding,
 void rebind(ajanta.naming.URN urn, ajanta.naming.NREntry entry, ajanta.util.Ticket t)
          Used when a ticket is signed by other than the agent server, In this case pass the ticket
 void rebindAgentServer(ajanta.naming.URN ag, ajanta.naming.URN server)
          updates the agent server location for an agent entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NRAccess

public NRAccess(ajanta.naming.URN serverURN,
                java.security.PrivateKey dsa_p,
                java.lang.String nameregURL)
constructor

Parameters:
serverURN - - the server invoking the name registry api
dsa_p - - private key of the server for Ticket signature
nameregURL - - the name registry will be connected to
Method Detail

authenticate

public ajanta.util.Ticket authenticate(ajanta.naming.URN caller,
                                       int nonce,
                                       ajanta.util.ContextObject context)
                                throws java.rmi.RemoteException
gets the initial ticket from name registry

Parameters:
caller - - client urn
nonce - - challenge
Returns:
a Ticket from server, which contatins the nonce signed by the name registry
java.rmi.RemoteException

bind

public void bind(ajanta.naming.URN urn,
                 ajanta.naming.NREntry entry)
          throws java.rmi.AlreadyBoundException,
                 java.rmi.RemoteException
Binds the URN with with the specified entry

Throws:
java.rmi.AlreadyBoundException - If name is already bound.
java.rmi.RemoteException - If remote operation failed

rebind

public void rebind(ajanta.naming.URN urn,
                   ajanta.naming.NREntry entry,
                   ajanta.util.Ticket t)
            throws java.rmi.RemoteException
Used when a ticket is signed by other than the agent server, In this case pass the ticket

java.rmi.RemoteException

rebind

public void rebind(ajanta.naming.URN urn,
                   ajanta.naming.NREntry entry)
            throws java.rmi.RemoteException
Rebinds the URN with with the specified entry, replacing any existing binding,

Throws:
java.rmi.RemoteException - If remote operation failed

rebindAgentServer

public void rebindAgentServer(ajanta.naming.URN ag,
                              ajanta.naming.URN server)
                       throws java.rmi.RemoteException
updates the agent server location for an agent entry.

Parameters:
ag - - agent name
server - - the new agentserver location
java.rmi.RemoteException

getURLs

public java.util.Vector getURLs(ajanta.naming.URN urn)
                         throws java.rmi.RemoteException
return the locations associated with this name

java.rmi.RemoteException

getURL

public java.net.URL getURL(ajanta.naming.URN urn)
                    throws java.rmi.RemoteException
Returs the first entry of the url list for this entry. Most of the cases it is the only entry

java.rmi.RemoteException

getCodeBaseURL

public java.net.URL getCodeBaseURL(ajanta.naming.URN urn)
                            throws java.rmi.RemoteException
returns the code base location of an agent server. if the entry is not an agent server entry, throws a remote exception

java.rmi.RemoteException

getVerifyKey

public java.security.PublicKey getVerifyKey(ajanta.naming.URN urn)
                                     throws java.rmi.RemoteException
returns the verification key for the signature key pair

java.rmi.RemoteException

getEncryptKey

public java.security.PublicKey getEncryptKey(ajanta.naming.URN urn)
                                      throws java.rmi.RemoteException
returns the public key encryption key pair

java.rmi.RemoteException

lookup

public ajanta.naming.NREntry lookup(ajanta.naming.URN urn)
                             throws java.rmi.RemoteException
Returns the NREntry object associated with the specified name in the registry.

Parameters:
urn - - the name of the entry
java.rmi.RemoteException

getCertificate

public java.security.cert.X509Certificate getCertificate(ajanta.naming.URN urn)
                                                  throws java.rmi.RemoteException
Parameters:
urn - URN of entity whose certificate is being requested
Returns:
X509 certificate
java.rmi.RemoteException

getNRCertificate

public java.security.cert.X509Certificate getNRCertificate()
                                                    throws java.rmi.RemoteException
java.rmi.RemoteException