|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dermi.Registry
public class Registry
This class provides Decentralized Registry's static and generic methods
Constructor Summary | |
---|---|
Registry()
|
Method Summary | |
---|---|
static void |
bind(java.lang.String name,
ERemote ref)
Binds the specified name to a remote object. |
static void |
bind(java.lang.String name,
java.util.Properties env)
Binds the specified name to a remote object. |
static void |
bindRoot()
Special root ("p2p://") bind method |
static boolean |
bindSecure(java.lang.String context,
Id id,
java.io.Serializable object,
java.lang.String pass)
|
static boolean |
bindSecure(java.lang.String context,
Id id,
java.io.Serializable object,
java.lang.String pass,
boolean getcheck)
|
static boolean |
bindSer(Id id,
java.io.Serializable object)
|
static boolean |
bindSer(java.lang.String context,
Id id,
java.io.Serializable object)
|
static boolean |
bindSer(java.lang.String name,
java.io.Serializable object)
|
static boolean |
bindSer(java.lang.String context,
java.lang.String name,
java.io.Serializable object)
|
static DermiConnection |
getConnection()
Method used to get the connection to the node (for reutilization purposes) |
static java.util.Properties |
getConnectionProperties()
|
static java.util.Properties |
getEnvironment(java.lang.String filename)
Returns the object's environment properties |
static java.util.Collection |
getIncomingLinks(java.lang.String context,
Id id)
|
static java.util.Collection |
getOutgoingLinks(java.lang.String context,
Id id)
|
static java.util.Hashtable |
getReplicaInfo()
|
static java.util.Hashtable |
getStorageInfo()
|
static void |
insert(java.lang.String context,
java.lang.String keywords,
java.lang.String key,
java.io.Serializable value)
|
static void |
insertURL(java.lang.String context,
Id key,
java.net.URL url,
java.lang.String field)
|
static boolean |
isConnected()
Method used to know if the registry is already connected to a node |
static void |
leave()
It closes the connection and kills the node |
static java.util.Collection |
list(java.lang.String root)
Returns a Vector of the names bound in the registry. |
static void |
loadRegistry(java.lang.String ref)
It connects to the Registry (by creating a node!) |
static ERemote |
lookup(java.lang.String name)
Returns a reference, a stub, for the remote object associated with the specified name. |
static 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. |
static java.io.Serializable |
lookupSecure(java.lang.String context,
Id id,
java.lang.String pass)
|
static java.io.Serializable |
lookupSer(java.lang.String url)
Returns a serialized object associated with the specified name. |
static java.io.Serializable |
lookupSer(java.lang.String context,
Id id)
Returns a serialized object associated with the specified name. |
static java.io.Serializable |
lookupSer(java.lang.String context,
Id id,
java.lang.String field)
|
static java.io.Serializable |
lookupSer(java.lang.String context,
java.lang.String url)
|
static java.net.URL |
lookupURL(java.lang.String context,
Id id,
java.lang.String field)
|
static void |
modify(java.lang.String context,
Id key,
java.util.Collection values,
java.lang.String field,
boolean add)
|
static void |
modify(java.lang.String context,
Id key,
java.lang.Object value,
java.lang.String field,
boolean add)
|
static bunshin.util.ResultSortedQueue |
query(java.lang.String context,
java.lang.String keywords)
|
static void |
rebind(java.lang.String name,
ERemote ref)
Rebinds the specified name in the registry. |
static void |
remove(java.lang.String context,
java.lang.String keywords,
java.lang.String key)
|
static void |
removeRemoteListener(java.lang.String context,
Id id,
java.lang.String field)
|
static void |
removeSer(Id id)
|
static void |
removeSer(java.lang.String name)
|
static void |
removeSer(java.lang.String context,
Id id,
java.lang.String field)
|
static void |
setInfoContext(java.lang.String context,
java.lang.String path,
java.lang.String url,
java.net.URL[] URLsList)
|
static void |
setInstance(Naming reg)
|
static void |
setRemoteListener(java.lang.String context,
Id id,
bunshin.RemoteListener listener,
java.lang.String field)
|
static 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 |
Constructor Detail |
---|
public Registry()
Method Detail |
---|
public static java.util.Properties getEnvironment(java.lang.String filename) throws RemoteException
filename
- String Object properties filename
RemoteException
- If something goes wrong ;-)public static java.util.Properties getConnectionProperties()
public 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 java.util.Hashtable getStorageInfo() throws RemoteException
RemoteException
public static java.util.Hashtable getReplicaInfo() throws RemoteException
RemoteException
public static void setInfoContext(java.lang.String context, java.lang.String path, java.lang.String url, java.net.URL[] URLsList) throws RemoteException
RemoteException
public static void leave() throws RemoteException
RemoteException
- If the disconnection 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 ERemote lookup(java.lang.String name, java.lang.String communityId, java.lang.String className) throws RemoteException
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 static java.io.Serializable lookupSer(java.lang.String context, Id id) throws RemoteException
id
- Id of the remote object in the Registry
RemoteException
- If the connection with the event service fails.public static java.io.Serializable lookupSer(java.lang.String context, Id id, java.lang.String field) throws RemoteException
RemoteException
public static java.net.URL lookupURL(java.lang.String context, Id id, java.lang.String field) throws RemoteException
RemoteException
public static java.io.Serializable lookupSer(java.lang.String url) throws RemoteException
id
- Id of the remote object in the Registry
RemoteException
- If the connection with the event service fails.public static java.io.Serializable lookupSer(java.lang.String context, java.lang.String url) throws RemoteException
RemoteException
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 bind(java.lang.String name, java.util.Properties env) throws RemoteException
name
- Id of the remote objectenv
- Object properties
RemoteException
- If the connection with the event service fails.public static void unbind(java.lang.String name) throws RemoteException
name
- Id of the remote object
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
public static void setInstance(Naming reg)
public static boolean bindSer(Id id, java.io.Serializable object) throws RemoteException
RemoteException
public static boolean bindSer(java.lang.String name, java.io.Serializable object) throws RemoteException
RemoteException
public static boolean bindSer(java.lang.String context, Id id, java.io.Serializable object) throws RemoteException
RemoteException
public static boolean bindSer(java.lang.String context, java.lang.String name, java.io.Serializable object) throws RemoteException
RemoteException
public static void removeSer(Id id) throws RemoteException
RemoteException
public static void removeSer(java.lang.String name) throws RemoteException
RemoteException
public static void removeSer(java.lang.String context, Id id, java.lang.String field) throws RemoteException
RemoteException
public static boolean bindSecure(java.lang.String context, Id id, java.io.Serializable object, java.lang.String pass) throws RemoteException
RemoteException
public static boolean bindSecure(java.lang.String context, Id id, java.io.Serializable object, java.lang.String pass, boolean getcheck) throws RemoteException
RemoteException
public static java.io.Serializable lookupSecure(java.lang.String context, Id id, java.lang.String pass) throws RemoteException
RemoteException
public static void insertURL(java.lang.String context, Id key, java.net.URL url, java.lang.String field) throws RemoteException
RemoteException
public static void modify(java.lang.String context, Id key, java.lang.Object value, java.lang.String field, boolean add) throws RemoteException
RemoteException
public static void modify(java.lang.String context, Id key, java.util.Collection values, java.lang.String field, boolean add) throws RemoteException
RemoteException
public static void setRemoteListener(java.lang.String context, Id id, bunshin.RemoteListener listener, java.lang.String field) throws RemoteException
RemoteException
public static void removeRemoteListener(java.lang.String context, Id id, java.lang.String field) throws RemoteException
RemoteException
public static java.util.Collection getIncomingLinks(java.lang.String context, Id id) throws RemoteException
RemoteException
public static java.util.Collection getOutgoingLinks(java.lang.String context, Id id) throws RemoteException
RemoteException
public static void insert(java.lang.String context, java.lang.String keywords, java.lang.String key, java.io.Serializable value) throws RemoteException
RemoteException
public static bunshin.util.ResultSortedQueue query(java.lang.String context, java.lang.String keywords) throws RemoteException
RemoteException
public static void remove(java.lang.String context, java.lang.String keywords, java.lang.String key) throws RemoteException
RemoteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |