- java.lang.Object
-
- com.pervasive.datarush.commons.util.SimpleRMI.Registry
-
-
Constructor Summary
Constructors Constructor Description Registry()
Create an empty registryRegistry(SimpleRMI.Registry reg)
Create a clone of an existing registry
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
get(Class<T> clazz)
Returns the registered implementation of the given interface.List<SimpleRMI.ServerListener>
getServerListeners()
Returns the list of registered services that implementSimpleRMI.ServerListener
<T> void
register(Class<T> clazz, T object)
Registers the single implementation of the given service interface.
-
-
-
Constructor Detail
-
Registry
public Registry()
Create an empty registry
-
Registry
public Registry(SimpleRMI.Registry reg)
Create a clone of an existing registry- Parameters:
reg
- the registry to clone
-
-
Method Detail
-
register
public <T> void register(Class<T> clazz, T object)
Registers the single implementation of the given service interface.- Type Parameters:
T
- the type of service- Parameters:
clazz
- the service interfaceobject
- an object implementing the service interface
-
get
public <T> T get(Class<T> clazz)
Returns the registered implementation of the given interface.- Type Parameters:
T
- the service interface- Parameters:
clazz
- the service interface- Returns:
- the implementation or null of none exists
-
getServerListeners
public List<SimpleRMI.ServerListener> getServerListeners()
Returns the list of registered services that implementSimpleRMI.ServerListener
- Returns:
- the list of registered services that implement
SimpleRMI.ServerListener
-
-