Package laas.openrobots.ontology.service
Annotation Type RPCMethod
-
@Documented @Retention(RUNTIME) @Target(METHOD) @Inherited public @interface RPCMethod
This annotation marks all the available methods exposed to remote clients.
To actually register your services by the server, you just need to annotate the relevant method with a @RPCMethod annotation and to call theOroServer.addNewServiceProviders(IServiceProvider)
method. This can be done at any time, even during execution. Connectors will be automatically updated with the new services.
A RPC method can take 0..n parameters, limited to primitive type or collection of primitive type to ensure maximum compatibility with the various connectors.
One exception exist: if one of the parameter expect aIEventConsumer
, the connector is expected to provide it as a mean for the event manager to notify the clients (only if events are implemented by this connector).
The serialization of the return value is under the responsability of the connectors. We recommend to only use primitive types or collections (maps, sets, lists) of primitive type. For unknown type, expect theirObject.toString()
method to be called for serialization.