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 the OroServer.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 a IEventConsumer, 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 their Object.toString() method to be called for serialization.
    See Also:
    BaseModule class for numerous example of RPC methods.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String category
      The category of the service.
      java.lang.String desc
      Contains a short description of the purpose of the service.
    • Element Detail

      • category

        java.lang.String category
        The category of the service. Used to sort the RPC methods by groups. Optional.
        Default:
        "base"
      • desc

        java.lang.String desc
        Contains a short description of the purpose of the service.
        Default:
        ""