|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdermi.Naming
The Naming class provides methods for storing and obtaining references to remote objects
in the remote object registry.
The dermi.Naming API (unlike Java RMI) does not use URLs, but properties objects or files
containing connection parameters. It is then mandatory to call the loadRegistry method
before using the functionality of the registry.
Nested Class Summary | |
---|---|
protected class |
Naming.NamingCommand
Common superclass for data reception commands. |
Constructor Summary | |
---|---|
Naming()
|
Method Summary | |
---|---|
static void |
bind(java.lang.String name,
ERemote ref)
Binds the specified name to a remote object. |
static void |
bindRoot()
Special root ("p2p://") bind method |
static DermiConnection |
getConnection()
Method used to get the connection to the Pastry node (for reutilization purposes) |
static boolean |
isConnected()
Method used to know if the registry is already connected to a Pastry node |
static java.util.Collection |
list(java.lang.String root)
Returns a Vector of the names bound in the registry. |
static void |
loadRegistry(rice.p2p.commonapi.IdFactory FACTORY,
rice.p2p.commonapi.Node pn,
int REPLICATION_FACTOR)
It connects to the decentralized registry |
static void |
loadRegistry(java.lang.String ref)
It connects to the Registry (by creating a pastry node!) |
static ERemote |
lookup(java.lang.String name)
Returns a reference, a stub, for the remote object associated with the specified name. |
static java.io.Serializable |
lookupSer(rice.p2p.commonapi.Id id)
Returns a reference, a stub, for the remote object associated with the specified name. |
static void |
rebind(java.lang.String name,
ERemote ref)
Rebinds the specified name in the registry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Naming()
Method Detail |
---|
public static void loadRegistry(rice.p2p.commonapi.IdFactory FACTORY, rice.p2p.commonapi.Node pn, int REPLICATION_FACTOR) throws RemoteException
FACTORY
- IdFactory Factory for Id creationpn
- Node The node where the registry will run onREPLICATION_FACTOR
- int Replication factor
RemoteException
- If registry cannot be createdpublic static void loadRegistry(java.lang.String ref) throws RemoteException
ref
- Name of properties file containing connection parameters.
RemoteException
- If the connection with the event service fails.public static ERemote lookup(java.lang.String name) throws RemoteException
name
- Id of the remote object in the Registry
RemoteException
- If the connection with the event service fails.public static java.io.Serializable lookupSer(rice.p2p.commonapi.Id id) throws RemoteException
id
- Id of the remote object in the Registry
RemoteException
- If the connection with the event service fails.public static boolean isConnected()
public static DermiConnection getConnection()
public static void bind(java.lang.String name, ERemote ref) throws RemoteException
name
- Id of the remote objectref
- remote object reference to bind
RemoteException
- If the connection with the event service fails.public static void bindRoot() throws RemoteException
RemoteException
- If the connection with the event service fails.public static void rebind(java.lang.String name, ERemote ref) throws RemoteException
name
- Id of the remote objectref
- remote object reference to bind
RemoteException
- If the connection with the event service fails.public static java.util.Collection list(java.lang.String root) throws RemoteException
dermi.RemoteException
- If the connection with the event service fails.
RemoteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |