|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRpcPublishOperations
Exposes publish and unpublish operations for RPCs. Used as a common holder of publish and unpublish methods required in separate RPC class hierarchies.
Method Summary | |
---|---|
boolean |
publishProdedure(IRpcHandler handler,
IRpcDefinition rpcDefinition)
Publish the named procedure to all known remote contexts. |
boolean |
publishRpcs(Class<?> definition,
Object handler)
Allows application code to remotely enable all methods in a handler object that are implementations of methods in an interface definition. |
boolean |
unpublishProdedure(IRpcDefinition rpcDefinition)
Unpublish the procedure from all connected remote contexts. |
boolean |
unpublishRpcs(Class<?> definition,
Object handler)
Allows application code to remove any previously remotely enabled methods published via publishRpcs(Class, Object) |
Method Detail |
---|
boolean publishProdedure(IRpcHandler handler, IRpcDefinition rpcDefinition)
There can only be one handler per procedure instance. Different handlers can be used for overloaded procedures. RPC definitions cannot overload the result type, if this method is called with a definition that attempts to overload the result type, the operation is ignored and no publish happens.
After this method has completed, remote contexts will be able to invoke the RPC.
handler
- the object that will handle any RPC invocations for this RPC
definition. This object must be thread safe.rpcDefinition
- the RPC definition
true
if the procedure was published,
false
if has already been publishedboolean unpublishProdedure(IRpcDefinition rpcDefinition)
rpcDefinition
- the RPC definition to unpublish
true
if the procedure was unpublishedboolean publishRpcs(Class<?> definition, Object handler)
There are some caveats to methods that can be remotely enabled; the method arguments and return types must be scalar and only the following types are supported:
This is a convenience method in-lieu of calling
publishProdedure(IRpcHandler, IRpcDefinition)
.
definition
- an interface that defines all the methods in the handler that
should be remotely enabled. This includes all methods in the
super-interfaces, if any.handler
- the object that implements the methods declared in the
definition interface. The handler does not necessarily have to
be an instance of the interface (i.e. does not need to
explicitly implement the interface, it only needs to implement
all the methods). All remote invocations of these methods will
be handled by this object. The remotely enabled methods
must be thread safe.
true
if all methods were successfully published
IllegalArgumentException
- if the handler does not implement all methods declared in the
definitionboolean unpublishRpcs(Class<?> definition, Object handler)
publishRpcs(Class, Object)
definition
- an interface that defines all the methods in the handler that
should be remotely disabled. This includes all methods in the
super-interfaces, if any.handler
- the object that implements the methods declared in the
definition interface. These methods will no longer be
available for remote invocation.
true
if all methods were successfully unpublished
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |