java.lang.Object
com.pervasive.datarush.commons.util.SimpleRMI.Registry
- Enclosing class:
- SimpleRMI
Registry of services. Services are always keyed by the interface that they
implement. That is, for a given interface we can have only one implementation
of that interface in the registry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TReturns the registered implementation of the given interface.Returns the list of registered services that implementSimpleRMI.ServerListener<T> voidRegisters the single implementation of the given service interface.
-
Constructor Details
-
Registry
public Registry()Create an empty registry -
Registry
Create a clone of an existing registry- Parameters:
reg- the registry to clone
-
-
Method Details
-
register
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
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
Returns the list of registered services that implementSimpleRMI.ServerListener- Returns:
- the list of registered services that implement
SimpleRMI.ServerListener
-