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
-
tkt
-
-
NameRegistryImpl(URN)
- CONSTRUCTOR
-
authenticate(URN, int)
- gets the initial ticket from name registry
-
bind(URN, NREntry, Ticket)
- This call is used to bind an entry to local name registry by
a agent server.
-
bind(URN, NREntry, URN, Ticket)
- This call is used to bind an entry to remote name registry by
a namre registry.
-
getCodeBaseURL(URN)
- returns the code base location of an agent server.
-
getEncryptKey(URN)
- returns the public key encryption key pair
-
getPublicKey(URN)
- returns the public key encryption key pair
-
getURL(URN)
- Returs the first entry of the url list for this entry.
-
getURLs(URN)
- returns the locations associated with this name
-
getVerifyKey(URN)
- returns the verification key for the signature key pair
-
lookup(URN)
- Returns the NREntry object associated with the specified name in the registry.
-
main(String[])
- main program starts up the server and waits for clients to invoke
-
newURN()
- Return new URN in this Name-Server namespace
-
rebind(URN, NREntry, Ticket)
- This call is used to rebind an entry to local name registry by
a agent server.
-
rebind(URN, NREntry, URN, Ticket)
- This call is used to rebind an entry to remote name registry by
a namre registry.
-
rebindAgentServer(URN, URN, Ticket)
- updates the agent server location for an agent entry.
-
rebindAgentServer(URN, URN, URN, Ticket)
- updates the agent server location for an agent entry.
tkt
protected Ticketing tkt
NameRegistryImpl
public NameRegistryImpl(URN nameRegistry) throws RemoteException
- CONSTRUCTOR
- Parameters:
- nameRegistry- - urn of the name registry
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
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
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
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
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
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.
getURLs
public Vector getURLs(URN urn) throws RemoteException
- returns the locations associated with this name
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
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
getPublicKey
public PublicKey getPublicKey(URN urn) throws RemoteException
- returns the public key encryption key pair
getEncryptKey
public PublicKey getEncryptKey(URN urn) throws RemoteException
- returns the public key encryption key pair
getVerifyKey
public PublicKey getVerifyKey(URN urn) throws RemoteException
- returns the verification key for the signature key pair
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
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
newURN
public URN newURN() throws RemoteException
- Return new URN in this Name-Server namespace
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