|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdermi.registry.pastry.Naming
public class 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. |
Method Summary | |
---|---|
void |
bind(java.lang.String name,
ERemote ref)
Binds the specified name to a remote object. |
void |
bind(java.lang.String name,
java.util.Properties env)
Binds the specified name to a remote object. |
void |
bindRoot()
Special root ("p2p://") bind method |
boolean |
bindSecure(java.lang.String context,
Id id,
java.io.Serializable object,
java.lang.String pass)
|
boolean |
bindSecure(java.lang.String context,
Id id,
java.io.Serializable object,
java.lang.String pass,
boolean getcheck)
|
boolean |
bindSer(Id id,
java.io.Serializable object)
|
boolean |
bindSer(java.lang.String context,
Id id,
java.io.Serializable object)
|
boolean |
bindSer(java.lang.String name,
java.io.Serializable object)
|
boolean |
bindSer(java.lang.String context,
java.lang.String name,
java.io.Serializable object)
|
DermiConnection |
getConnection()
Method used to get the connection to the Pastry node (for reutilization purposes) |
java.util.Collection |
getIncomingLinks(java.lang.String context,
Id id)
|
static Naming |
getInstance()
|
java.util.Collection |
getOutgoingLinks(java.lang.String context,
Id id)
|
java.util.Hashtable |
getReplicaInfo()
|
java.util.Hashtable |
getStorageInfo()
|
void |
insert(java.lang.String context,
java.lang.String keywords,
java.lang.String key,
java.io.Serializable value)
|
void |
insertURL(java.lang.String context,
Id id,
java.net.URL url,
java.lang.String field)
|
boolean |
isConnected()
Method used to know if the registry is already connected to a Pastry node |
void |
leave()
It closes the connection and kills the node |
java.util.Collection |
list(java.lang.String root)
Returns a Vector of the names bound in the registry. |
void |
loadRegistry(DermiConnection conn,
java.util.Properties props)
It connects to the decentralized registry |
void |
loadRegistry(java.lang.String ref)
It connects to the Registry (by creating a node!) |
ERemote |
lookup(java.lang.String name)
Returns a reference, a stub, for the remote object associated with the specified name. |
ERemote |
lookup(java.lang.String name,
java.lang.String communityId,
java.lang.String className)
Returns a reference, a stub, for the remote object associated with the specified name. |
java.io.Serializable |
lookupSecure(java.lang.String context,
Id id,
java.lang.String pass)
|
java.io.Serializable |
lookupSer(java.lang.String componentURL)
Returns a serializable object associated with the specified name. |
java.io.Serializable |
lookupSer(java.lang.String context,
Id id)
Returns a serializable object associated with the specified name. |
java.io.Serializable |
lookupSer(java.lang.String context,
Id id,
java.lang.String field)
|
java.io.Serializable |
lookupSer(java.lang.String context,
java.lang.String componentURL)
|
java.net.URL |
lookupURL(java.lang.String context,
Id id,
java.lang.String field)
|
void |
modify(java.lang.String context,
Id id,
java.util.Collection values,
java.lang.String field,
boolean add)
|
void |
modify(java.lang.String context,
Id id,
java.lang.Object value,
java.lang.String field,
boolean add)
|
bunshin.util.ResultSortedQueue |
query(java.lang.String context,
java.lang.String keywords)
|
void |
rebind(java.lang.String name,
ERemote ref)
Rebinds the specified name in the registry. |
void |
remove(java.lang.String context,
java.lang.String keywords,
java.lang.String key)
|
void |
removeRemoteListener(java.lang.String context,
Id id,
java.lang.String field)
|
void |
removeSer(Id id)
|
void |
removeSer(java.lang.String key)
|
void |
removeSer(java.lang.String context,
Id id,
java.lang.String field)
|
void |
setInfoContext(java.lang.String context,
java.lang.String path,
java.lang.String url,
java.net.URL[] URLsList)
|
void |
setRemoteListener(java.lang.String context,
Id id,
bunshin.RemoteListener listener,
java.lang.String field)
|
void |
unbind(java.lang.String name)
Unbinds the specified name from a remote object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Naming getInstance()
public void loadRegistry(DermiConnection conn, java.util.Properties props) throws RemoteException
conn
- DermiConnection The Dermi node where the registry will run on
RemoteException
- If registry cannot be createdpublic void loadRegistry(java.lang.String ref) throws RemoteException
loadRegistry
in interface Naming
ref
- Name of properties file containing connection parameters.
RemoteException
- If the connection with the event service fails.public void setInfoContext(java.lang.String context, java.lang.String path, java.lang.String url, java.net.URL[] URLsList) throws RemoteException
setInfoContext
in interface Naming
RemoteException
public void leave() throws RemoteException
leave
in interface Naming
RemoteException
- If the connection with the event service fails.public ERemote lookup(java.lang.String name) throws RemoteException
lookup
in interface Naming
name
- Id of the remote object in the Registry
RemoteException
- If the connection with the event service fails.public ERemote lookup(java.lang.String name, java.lang.String communityId, java.lang.String className) throws RemoteException
lookup
in interface Naming
name
- Id of the remote object in the RegistrycommunityId
- Id of the community where the object is to be activated (if necessary)
RemoteException
- If the connection with the event service fails.public java.io.Serializable lookupSer(java.lang.String context, Id id) throws RemoteException
lookupSer
in interface Naming
id
- Id of the remote object in the Registry
RemoteException
- If the connection with the event service fails.public java.io.Serializable lookupSer(java.lang.String context, Id id, java.lang.String field) throws RemoteException
lookupSer
in interface Naming
RemoteException
public java.net.URL lookupURL(java.lang.String context, Id id, java.lang.String field) throws RemoteException
lookupURL
in interface Naming
RemoteException
public java.io.Serializable lookupSer(java.lang.String context, java.lang.String componentURL) throws RemoteException
lookupSer
in interface Naming
RemoteException
public java.io.Serializable lookupSer(java.lang.String componentURL) throws RemoteException
Naming
lookupSer
in interface Naming
RemoteException
- If the connection with the event service fails.public void removeSer(java.lang.String context, Id id, java.lang.String field) throws RemoteException
removeSer
in interface Naming
RemoteException
public void removeSer(Id id) throws RemoteException
removeSer
in interface Naming
RemoteException
public void removeSer(java.lang.String key) throws RemoteException
removeSer
in interface Naming
RemoteException
public boolean isConnected()
isConnected
in interface Naming
public DermiConnection getConnection()
getConnection
in interface Naming
public void bind(java.lang.String name, ERemote ref) throws RemoteException
bind
in interface Naming
name
- Id of the remote objectref
- remote object reference to bind
RemoteException
- If the connection with the event service fails.public void bind(java.lang.String name, java.util.Properties env) throws RemoteException
bind
in interface Naming
name
- Id of the remote objectenv
- Object properties
RemoteException
- If the connection with the event service fails.public boolean bindSer(Id id, java.io.Serializable object) throws RemoteException
bindSer
in interface Naming
RemoteException
public boolean bindSer(java.lang.String context, Id id, java.io.Serializable object) throws RemoteException
bindSer
in interface Naming
RemoteException
public boolean bindSer(java.lang.String context, java.lang.String name, java.io.Serializable object) throws RemoteException
bindSer
in interface Naming
RemoteException
public boolean bindSer(java.lang.String name, java.io.Serializable object) throws RemoteException
bindSer
in interface Naming
RemoteException
public void unbind(java.lang.String name) throws RemoteException
unbind
in interface Naming
name
- Id of the remote object
dermi.NotBoundException
- - if the Registry does not contains this Id.
dermi.RemoteException
- - if the connection with the event service fails.
RemoteException
- If the connection with the event service fails.public void bindRoot() throws RemoteException
bindRoot
in interface Naming
RemoteException
- If the connection with the event service fails.public void rebind(java.lang.String name, ERemote ref) throws RemoteException
rebind
in interface Naming
name
- Id of the remote objectref
- remote object reference to bind
RemoteException
- If the connection with the event service fails.public java.util.Hashtable getStorageInfo() throws RemoteException
getStorageInfo
in interface Naming
RemoteException
public java.util.Hashtable getReplicaInfo() throws RemoteException
getReplicaInfo
in interface Naming
RemoteException
public java.util.Collection list(java.lang.String root) throws RemoteException
list
in interface Naming
dermi.RemoteException
- If the connection with the event service fails.
RemoteException
public boolean bindSecure(java.lang.String context, Id id, java.io.Serializable object, java.lang.String pass) throws RemoteException
bindSecure
in interface Naming
RemoteException
public boolean bindSecure(java.lang.String context, Id id, java.io.Serializable object, java.lang.String pass, boolean getcheck) throws RemoteException
bindSecure
in interface Naming
RemoteException
public java.io.Serializable lookupSecure(java.lang.String context, Id id, java.lang.String pass) throws RemoteException
lookupSecure
in interface Naming
RemoteException
public void insertURL(java.lang.String context, Id id, java.net.URL url, java.lang.String field) throws RemoteException
insertURL
in interface Naming
RemoteException
public void modify(java.lang.String context, Id id, java.lang.Object value, java.lang.String field, boolean add) throws RemoteException
modify
in interface Naming
RemoteException
public void modify(java.lang.String context, Id id, java.util.Collection values, java.lang.String field, boolean add) throws RemoteException
modify
in interface Naming
RemoteException
public void setRemoteListener(java.lang.String context, Id id, bunshin.RemoteListener listener, java.lang.String field) throws RemoteException
setRemoteListener
in interface Naming
RemoteException
public void removeRemoteListener(java.lang.String context, Id id, java.lang.String field) throws RemoteException
removeRemoteListener
in interface Naming
RemoteException
public java.util.Collection getIncomingLinks(java.lang.String context, Id id) throws RemoteException
getIncomingLinks
in interface Naming
RemoteException
public java.util.Collection getOutgoingLinks(java.lang.String context, Id id) throws RemoteException
getOutgoingLinks
in interface Naming
RemoteException
public void insert(java.lang.String context, java.lang.String keywords, java.lang.String key, java.io.Serializable value) throws RemoteException
insert
in interface Naming
RemoteException
public bunshin.util.ResultSortedQueue query(java.lang.String context, java.lang.String keywords) throws RemoteException
query
in interface Naming
RemoteException
public void remove(java.lang.String context, java.lang.String keywords, java.lang.String key) throws RemoteException
remove
in interface Naming
RemoteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |