Package com.inductiveautomation.ignition.common.rpc


@ParametersAreNonnullByDefault package com.inductiveautomation.ignition.common.rpc
Contains the core classes and interfaces for the RPC system as of Ignition 8.3.0.

The most basic unit of the new system is the RpcCall locating triple - this triple will be sent to the gateway via a 'side channel', and is used to identify an appropriate GatewayRpcSerializer to handle the call. That serializer will then be used to read the parameters from the stream, and write the return value back.

On the sending side, the ClientRpcSerializer will be used to write outgoing parameters to the stream, and read back the incoming return value.

In this way, the system is both serialization format agnostic (allowing each module to choose its own format), and decouples the actual logic of RPC calls from their serialization.

It is strongly recommended to follow IA's pattern, as follows:

  1. Define your API contract in standard Java interface(s).
  2. Annotate those interface(s) with RpcInterface.
  3. On the Gateway, create a standard Java object that implements each interface.
  4. Wrap your constructed implementations in GatewayRpcImplementation#of() on the Gateway.
  5. On the Client/Designer, use GatewayConnectionManager.getInstance().getRpcImplementation() to obtain a proxy instance of your interface that automatically issues calls to the gateway.
This allows for clean definition of common APIs, and automatic generation of the necessary plumbing to make them work.