All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ajanta.naming.NameRegistryImpl

java.lang.Object
   |
   +----java.rmi.server.RemoteObject
           |
           +----java.rmi.server.RemoteServer
                   |
                   +----java.rmi.server.UnicastRemoteObject
                           |
                           +----ajanta.naming.NameRegistryImpl

public class NameRegistryImpl
extends UnicastRemoteObject
implements NameRegistry

Variable Index

 o tkt

Constructor Index

 o NameRegistryImpl(URN)
CONSTRUCTOR

Method Index

 o authenticate(URN, int)
gets the initial ticket from name registry
 o bind(URN, NREntry, Ticket)
This call is used to bind an entry to local name registry by a agent server.
 o bind(URN, NREntry, URN, Ticket)
This call is used to bind an entry to remote name registry by a namre registry.
 o getCodeBaseURL(URN)
returns the code base location of an agent server.
 o getEncryptKey(URN)
returns the public key encryption key pair
 o getPublicKey(URN)
returns the public key encryption key pair
 o getURL(URN)
Returs the first entry of the url list for this entry.
 o getURLs(URN)
returns the locations associated with this name
 o getVerifyKey(URN)
returns the verification key for the signature key pair
 o lookup(URN)
Returns the NREntry object associated with the specified name in the registry.
 o main(String[])
main program starts up the server and waits for clients to invoke
 o newURN()
Return new URN in this Name-Server namespace
 o rebind(URN, NREntry, Ticket)
This call is used to rebind an entry to local name registry by a agent server.
 o rebind(URN, NREntry, URN, Ticket)
This call is used to rebind an entry to remote name registry by a namre registry.
 o rebindAgentServer(URN, URN, Ticket)
updates the agent server location for an agent entry.
 o rebindAgentServer(URN, URN, URN, Ticket)
updates the agent server location for an agent entry.

Variables

 o tkt
 protected Ticketing tkt

Constructors

 o NameRegistryImpl
 public NameRegistryImpl(URN nameRegistry) throws RemoteException
CONSTRUCTOR

Parameters:
nameRegistry- - urn of the name registry

Methods

 o authenticate
 public Ticket authenticate(URN caller,
                            int nonce)
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
 o bind
 public void bind(URN urn,
                  NREntry entry,
                  Ticket ticket) throws AlreadyBoundException, RemoteException
This call is used to bind an entry to local name registry by a agent server. binds an entry in the name registry. If an entry for this urn already exists throw an exception. the binder or ticket signer needs to have create name permission in this namespace. On success binder will be a owner of the acl of this entry and have create name and write permission on the entry.

Parameters:
urn - - the urn will be registered
entry - - the entry wich contain an acl
ticket - - needed for authentication. ticket.signer is the binder
 o bind
 public void bind(URN urn,
                  NREntry entry,
                  URN binder,
                  Ticket ticket) throws AlreadyBoundException, RemoteException
This call is used to bind an entry to remote name registry by a namre registry. binds an entry in the name registry. If an entry for this urn already exists throw an exception. the binder here is server ticket signer, needs to have create name permission in this namespace. On success binder will be a owner of the acl of this entry and have create name and write permission on the entry.

Parameters:
urn - - the urn will be registered
entry - - the entry wich contain an acl
binder - - server's ticket.signer is the binder
 o lookup
 public NREntry lookup(URN urn) throws RemoteException
Returns the NREntry object associated with the specified name in the registry.

Parameters:
urn - - the name of the entry
 o rebind
 public void rebind(URN urn,
                    NREntry entry,
                    Ticket ticket) throws RemoteException
This call is used to rebind an entry to local name registry by a agent server. If an entry already exists for this urn and the Ticket signer has write permission and is a owner of the acl of the entry, replace the old entry with new entry If no previous entry exists and if the Ticket signer has create name permission, create a new entry. In both cases give the Ticket signer write and create permission on this entry. In the creating new entry case ticket signer will become a owner of the acl as bind.

Parameters:
urn - - the urn will be registered
entry - - the entry wich contain an acl
ticket - - needed for authentication. ticket.signer is the binder
 o rebind
 public void rebind(URN urn,
                    NREntry entry,
                    URN binder,
                    Ticket ticket) throws RemoteException
This call is used to rebind an entry to remote name registry by a namre registry. If an entry already exists for this urn and the binder has write permission and is a owner of the acl of the entry, replace the old entry with new entry // NOT IMPLEMENTED, MAY NEED FROM REMOTE BIND // * If an entry already exists for this urn and the Ticket signer // * has write permission but not an owner of the acl, the new entry acl // * is replaced by the old one // If no previous entry exists and if the binder has create name permission, create a new entry. In both cases give the binder write and create permission on this entry. In the creating new entry, binder will become a owner of the acl as bind.

Parameters:
urn - - the urn will be registered
entry - - the entry wich contain an acl
binder - - server's ticket.signer is the binder
ticket - - needed for authentication.
 o getURLs
 public Vector getURLs(URN urn) throws RemoteException
returns the locations associated with this name

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

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

 o getPublicKey
 public PublicKey getPublicKey(URN urn) throws RemoteException
returns the public key encryption key pair

 o getEncryptKey
 public PublicKey getEncryptKey(URN urn) throws RemoteException
returns the public key encryption key pair

 o getVerifyKey
 public PublicKey getVerifyKey(URN urn) throws RemoteException
returns the verification key for the signature key pair

 o rebindAgentServer
 public void rebindAgentServer(URN ag,
                               URN server,
                               Ticket ticket) throws RemoteException
updates the agent server location for an agent entry. the new agent server will get create name and write permission on the entry At the same time the previous server if not an owner of the acl, will lose the create name and write permission.

Parameters:
ag - - agent name
server - - the new agentserver location
ticket - - needed for authentication. ticket.signer is the binder
 o rebindAgentServer
 public void rebindAgentServer(URN ag,
                               URN server,
                               URN binder,
                               Ticket ticket) throws RemoteException
updates the agent server location for an agent entry. the new agent server will get create name and write permission on the entry At the same time the previous server if not an owner of the acl, will lose the create name and write permission

Parameters:
ag - - agent name
server - - the new agentserver location
binder - - server's ticket.signer is the binder
ticket - - needed for authentication. ticket.signer is the binder
 o newURN
 public URN newURN() throws RemoteException
Return new URN in this Name-Server namespace

 o main
 public static void main(String argv[])
main program starts up the server and waits for clients to invoke


All Packages  Class Hierarchy  This Package  Previous  Next  Index