Modifier and Type | Class and Description |
---|---|
static class |
NameRegistrar.NotFoundException |
Modifier and Type | Method and Description |
---|---|
void |
dump(java.io.PrintStream p,
java.lang.String indent) |
void |
dump(java.io.PrintStream p,
java.lang.String indent,
boolean detail) |
static <T> T |
get(java.lang.String key)
Get a value from the registry.
|
static <T> T |
get(java.lang.String key,
long timeout)
Get a value from the registry - wait for it specified time.
|
static java.util.Map<java.lang.String,java.lang.Object> |
getAsMap() |
static <T> T |
getIfExists(java.lang.String key)
Get a value from the registry - without casting
NotFoundException . |
static NameRegistrar |
getInstance() |
static TSpace<java.lang.String,java.lang.Object> |
getSpace() |
static void |
register(java.lang.String key,
java.lang.Object value)
register object
|
static void |
unregister(java.lang.String key) |
public static TSpace<java.lang.String,java.lang.Object> getSpace()
public static java.util.Map<java.lang.String,java.lang.Object> getAsMap()
public static NameRegistrar getInstance()
public static void register(java.lang.String key, java.lang.Object value)
key
- - key with which the specified value is to be associated.value
- - value to be associated with the specified keypublic static void unregister(java.lang.String key)
key
- key whose mapping is to be removed from registrar.public static <T> T get(java.lang.String key) throws NameRegistrar.NotFoundException
T
- desired type of entry value.key
- the key whose associated value is to be returned.NameRegistrar.NotFoundException
- if key not present in registrarpublic static <T> T get(java.lang.String key, long timeout)
T
- desired type of value.key
- the key whose associated value is to be returned.timeout
- the maximum waiting time (in miliseconds) for
the appearance of value in the registry.null
if it does not existpublic static <T> T getIfExists(java.lang.String key)
NotFoundException
.T
- desired type of value.key
- the key whose associated value is to be returned.null
if it does not existpublic void dump(java.io.PrintStream p, java.lang.String indent)
public void dump(java.io.PrintStream p, java.lang.String indent, boolean detail)