dermi.registry
Interface Naming

All Known Implementing Classes:
Naming

public interface Naming

Interface to the Naming class. It follows the singleton design pattern.

Version:
1.2
Author:
Carles Pairot

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 node (for reutilization purposes)
 java.util.Collection getIncomingLinks(java.lang.String context, Id id)
           
 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 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(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.
 

Method Detail

loadRegistry

void loadRegistry(java.lang.String ref)
                  throws RemoteException
It connects to the Registry (by creating a node!)

Parameters:
ref - Name of properties file containing connection parameters.
Throws:
RemoteException - If the connection with the event service fails.

setInfoContext

void setInfoContext(java.lang.String context,
                    java.lang.String path,
                    java.lang.String url,
                    java.net.URL[] URLsList)
                    throws RemoteException
Throws:
RemoteException

leave

void leave()
           throws RemoteException
It closes the connection and kills the node

Throws:
RemoteException - If the connection with the event service fails.

lookup

ERemote lookup(java.lang.String name)
               throws RemoteException
Returns a reference, a stub, for the remote object associated with the specified name.

Parameters:
name - Id of the remote object in the Registry
Returns:
Eremote Reference to the remote object
Throws:
RemoteException - If the connection with the event service fails.

lookup

ERemote lookup(java.lang.String name,
               java.lang.String communityId,
               java.lang.String className)
               throws RemoteException
Returns a reference, a stub, for the remote object associated with the specified name. Should this reference be not bound, start it remotely in the community, register it and return the newly-created reference

Parameters:
name - Id of the remote object in the Registry
communityId - Id of the community where the object is to be activated (if necessary)
Returns:
Eremote Reference to the remote object
Throws:
RemoteException - If the connection with the event service fails.

lookupSer

java.io.Serializable lookupSer(java.lang.String context,
                               Id id)
                               throws RemoteException
Returns a serializable object associated with the specified name.

Parameters:
String - object's url
Returns:
Serializable Object's value
Throws:
RemoteException - If the connection with the event service fails.

lookupSer

java.io.Serializable lookupSer(java.lang.String context,
                               Id id,
                               java.lang.String field)
                               throws RemoteException
Throws:
RemoteException

lookupURL

java.net.URL lookupURL(java.lang.String context,
                       Id id,
                       java.lang.String field)
                       throws RemoteException
Throws:
RemoteException

lookupSer

java.io.Serializable lookupSer(java.lang.String componentURL)
                               throws RemoteException
Returns a serializable object associated with the specified name.

Parameters:
String - object's url
Returns:
Serializable Object's value
Throws:
RemoteException - If the connection with the event service fails.

lookupSer

java.io.Serializable lookupSer(java.lang.String context,
                               java.lang.String componentURL)
                               throws RemoteException
Throws:
RemoteException

removeSer

void removeSer(Id id)
               throws RemoteException
Throws:
RemoteException

removeSer

void removeSer(java.lang.String key)
               throws RemoteException
Throws:
RemoteException

removeSer

void removeSer(java.lang.String context,
               Id id,
               java.lang.String field)
               throws RemoteException
Throws:
RemoteException

isConnected

boolean isConnected()
Method used to know if the registry is already connected to a node

Returns:
boolean true if it is connected

getConnection

DermiConnection getConnection()
Method used to get the connection to the node (for reutilization purposes)

Returns:
DermiConnection The connection

bind

void bind(java.lang.String name,
          ERemote ref)
          throws RemoteException
Binds the specified name to a remote object.

Parameters:
name - Id of the remote object
ref - remote object reference to bind
Throws:
RemoteException - If the connection with the event service fails.

bind

void bind(java.lang.String name,
          java.util.Properties env)
          throws RemoteException
Binds the specified name to a remote object.

Parameters:
name - Id of the remote object
env - Object properties
Throws:
RemoteException - If the connection with the event service fails.

unbind

void unbind(java.lang.String name)
            throws RemoteException
Unbinds the specified name from a remote object.

Parameters:
name - Id of the remote object
Throws:
RemoteException - If the connection with the event service fails.

bindRoot

void bindRoot()
              throws RemoteException
Special root ("p2p://") bind method

Throws:
RemoteException - If the connection with the event service fails.

rebind

void rebind(java.lang.String name,
            ERemote ref)
            throws RemoteException
Rebinds the specified name in the registry.

Parameters:
name - Id of the remote object
ref - remote object reference to bind
Throws:
RemoteException - If the connection with the event service fails.

list

java.util.Collection list(java.lang.String root)
                          throws RemoteException
Returns a Vector of the names bound in the registry. The Vector contains a snapshot of the names present in the registry at the time of the call.

Returns:
Vector A list of Ids from remote objects.
Throws:
dermi.RemoteException - If the connection with the event service fails.
RemoteException

bindSer

boolean bindSer(Id id,
                java.io.Serializable object)
                throws RemoteException
Throws:
RemoteException

bindSer

boolean bindSer(java.lang.String context,
                Id id,
                java.io.Serializable object)
                throws RemoteException
Throws:
RemoteException

bindSer

boolean bindSer(java.lang.String context,
                java.lang.String name,
                java.io.Serializable object)
                throws RemoteException
Throws:
RemoteException

bindSer

boolean bindSer(java.lang.String name,
                java.io.Serializable object)
                throws RemoteException
Throws:
RemoteException

getStorageInfo

java.util.Hashtable getStorageInfo()
                                   throws RemoteException
Throws:
RemoteException

getReplicaInfo

java.util.Hashtable getReplicaInfo()
                                   throws RemoteException
Throws:
RemoteException

bindSecure

boolean bindSecure(java.lang.String context,
                   Id id,
                   java.io.Serializable object,
                   java.lang.String pass)
                   throws RemoteException
Throws:
RemoteException

bindSecure

boolean bindSecure(java.lang.String context,
                   Id id,
                   java.io.Serializable object,
                   java.lang.String pass,
                   boolean getcheck)
                   throws RemoteException
Throws:
RemoteException

lookupSecure

java.io.Serializable lookupSecure(java.lang.String context,
                                  Id id,
                                  java.lang.String pass)
                                  throws RemoteException
Throws:
RemoteException

insertURL

void insertURL(java.lang.String context,
               Id id,
               java.net.URL url,
               java.lang.String field)
               throws RemoteException
Throws:
RemoteException

modify

void modify(java.lang.String context,
            Id id,
            java.lang.Object value,
            java.lang.String field,
            boolean add)
            throws RemoteException
Throws:
RemoteException

modify

void modify(java.lang.String context,
            Id id,
            java.util.Collection values,
            java.lang.String field,
            boolean add)
            throws RemoteException
Throws:
RemoteException

setRemoteListener

void setRemoteListener(java.lang.String context,
                       Id id,
                       bunshin.RemoteListener listener,
                       java.lang.String field)
                       throws RemoteException
Throws:
RemoteException

removeRemoteListener

void removeRemoteListener(java.lang.String context,
                          Id id,
                          java.lang.String field)
                          throws RemoteException
Throws:
RemoteException

getOutgoingLinks

java.util.Collection getOutgoingLinks(java.lang.String context,
                                      Id id)
                                      throws RemoteException
Throws:
RemoteException

getIncomingLinks

java.util.Collection getIncomingLinks(java.lang.String context,
                                      Id id)
                                      throws RemoteException
Throws:
RemoteException

insert

void insert(java.lang.String context,
            java.lang.String keywords,
            java.lang.String key,
            java.io.Serializable value)
            throws RemoteException
Throws:
RemoteException

query

bunshin.util.ResultSortedQueue query(java.lang.String context,
                                     java.lang.String keywords)
                                     throws RemoteException
Throws:
RemoteException

remove

void remove(java.lang.String context,
            java.lang.String keywords,
            java.lang.String key)
            throws RemoteException
Throws:
RemoteException