Package com.levigo.jadice.web.server
Interface ServerOperationRegistry
public interface ServerOperationRegistry
A registry interface for
ServerOperation
implementations.
Every ServerOperation
that shall be made available for invocation has to be registered
using the register(Class, ServerOperation)
or
register(Class, ContextualFactory)
methods.
-
Method Summary
Modifier and TypeMethodDescription<M extends ServerOperationMessage,
P extends ServerOperationParameters<M>>
voidregister
(Class<P> parametersClass, ContextualFactory<ServerOperation<P, M>> factory) Register aContextualFactory
, creatingServerOperation
instances.<M extends ServerOperationMessage,
P extends ServerOperationParameters<M>>
voidregister
(Class<P> parametersClass, ServerOperation<P, M> serverOperation) Registers aServerOperation
implementation using the specifiedServerOperationParameters
class as key.
-
Method Details
-
register
<M extends ServerOperationMessage,P extends ServerOperationParameters<M>> void register(Class<P> parametersClass, ServerOperation<P, M> serverOperation) Registers aServerOperation
implementation using the specifiedServerOperationParameters
class as key. Registered implementations can be invoked by providing the correspondingServerOperationParameters
class.- Type Parameters:
M
- The implementor ofServerOperationMessage
P
- The implementor ofServerOperationParameters
- Parameters:
parametersClass
- The server operation parameters class type.serverOperation
- The server operation implementation.
-
register
<M extends ServerOperationMessage,P extends ServerOperationParameters<M>> void register(Class<P> parametersClass, ContextualFactory<ServerOperation<P, M>> factory) Register aContextualFactory
, creatingServerOperation
instances. This method differs fromregister(Class, ServerOperation)
as it allows to provide aContextualFactory
, creating instances depending on the invocation context.- Type Parameters:
M
- The implementor ofServerOperationMessage
P
- The implementor ofServerOperationParameters
- Parameters:
parametersClass
- The server operation parameters class type.factory
- aContextualFactory
responsible to createServerOperation
instances
-