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:
- Define your API contract in standard Java interface(s).
- Annotate those interface(s) with
RpcInterface
. - On the Gateway, create a standard Java object that implements each interface.
- Wrap your constructed implementations in
GatewayRpcImplementation#of()
on the Gateway. - On the Client/Designer, use
GatewayConnectionManager.getInstance().getRpcImplementation()
to obtain a proxy instance of your interface that automatically issues calls to the gateway.
-
ClassDescriptionThe Client half of the negotiation of RPC payloads between the gateway and clients/designers.The Gateway half of the negotiation of RPC payloads between the gateway and clients/designers.Deserializes a push notification message from the provided input stream.An adapter to send arbitrary types over the Designer/Client's "push notification" API, allowing the gateway to initiate actions out of band.Metadata for a given RPC call, identifying the target function to be invoked.Common wrapper for an exception that is thrown during an RPC call.Marks an interface as an RPC interface.Marker meta-interface combining
GatewayRpcSerializer
andClientRpcSerializer
.