public class InvocationManager extends Object implements EventListener
Invocations are like remote procedure calls in that they are named and take arguments. All
arguments must be Streamable objects, primitive types, or String objects. All arguments
are passed by value (by serializing and unserializing the arguments); there is no special
facility provided for referencing non-local objects (it is assumed that the distributed object
facility will already be in use for any objects that should be shared).
The server invocation manager listens for invocation requests from the client and passes them on to the invocation provider registered for the requested invocation module. It also provides a mechanism by which responses and asynchronous notification invocations can be delivered to the client.
| Constructor and Description |
|---|
InvocationManager(PresentsDObjectMgr omgr)
Constructs an invocation manager which will use the supplied distributed object manager to
operate its invocation services.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearDispatcher(InvocationMarshaller<?> marsh)
Clears out a dispatcher registration.
|
void |
eventReceived(DEvent event)
Called when any event has been dispatched on an object.
|
List<InvocationMarshaller<?>> |
getBootstrapServices(String[] bootGroups)
Constructs a list of all bootstrap services registered in any of the supplied groups.
|
Class<?> |
getDispatcherClass(int invCode)
Get the class that is being used to dispatch the specified invocation code, for
informational purposes.
|
int |
getOid()
Returns the object id of the invocation services object.
|
<T extends InvocationMarshaller<?>> |
registerDispatcher(InvocationDispatcher<T> dispatcher)
Registers the supplied invocation dispatcher, returning a marshaller that can be used to
send requests to the provider for whom the dispatcher is proxying.
|
<T extends InvocationMarshaller<?>> |
registerDispatcher(InvocationDispatcher<T> dispatcher,
boolean bootstrap)
Deprecated.
|
<T extends InvocationMarshaller<?>> |
registerDispatcher(InvocationDispatcher<T> dispatcher,
String group)
Registers the supplied invocation dispatcher, returning a marshaller that can be used to
send requests to the provider for whom the dispatcher is proxying.
|
<T extends InvocationMarshaller<?>> |
registerProvider(InvocationProvider provider,
Class<T> mclass)
Registers the supplied invocation service provider.
|
<T extends InvocationMarshaller<?>> |
registerProvider(InvocationProvider provider,
Class<T> mclass,
String group)
Registers the supplied invocation service provider.
|
@Inject public InvocationManager(PresentsDObjectMgr omgr)
public int getOid()
public <T extends InvocationMarshaller<?>> T registerProvider(InvocationProvider provider, Class<T> mclass)
provider - the provider to be registered.mclass - the class of the invocation marshaller generated for the service.public <T extends InvocationMarshaller<?>> T registerProvider(InvocationProvider provider, Class<T> mclass, String group)
provider - the provider to be registered.mclass - the class of the invocation marshaller generated for the service.group - the bootstrap group in which this marshaller is to be registered, or null if it
is not a bootstrap service. Do not: register a marshaller with multiple boot
groups. You must collect shared marshaller into as fine grained a set of groups as necessary
and have different types of clients specify the list of groups they need.public <T extends InvocationMarshaller<?>> T registerDispatcher(InvocationDispatcher<T> dispatcher)
dispatcher - the dispatcher to be registered.@Deprecated public <T extends InvocationMarshaller<?>> T registerDispatcher(InvocationDispatcher<T> dispatcher, boolean bootstrap)
registerDispatcher(InvocationDispatcher).public <T extends InvocationMarshaller<?>> T registerDispatcher(InvocationDispatcher<T> dispatcher, String group)
dispatcher - the dispatcher to be registered.group - the bootstrap group in which this marshaller is to be registered, or null if it
is not a bootstrap service. Do not: register a dispatcher with multiple boot
groups. You must collect shared dispatchers into as fine grained a set of groups as
necessary and have different types of clients specify the list of groups they need.public void clearDispatcher(InvocationMarshaller<?> marsh)
public List<InvocationMarshaller<?>> getBootstrapServices(String[] bootGroups)
public Class<?> getDispatcherClass(int invCode)
public void eventReceived(DEvent event)
EventListenereventReceived in interface EventListenerevent - The event that was dispatched on the object.Copyright © 2015. All rights reserved.