Skip to main content Skip to complementary content

RpcConnection Class

Namespace: Qlik.Sense.JsonRpc
Assembly: Qlik.Sense.JsonRpc.dll

RpcConnection is responsible for handling the JsonRpc traffic to and from a Qlik Sense instance.

Inheritance

Syntax

public class RpcConnection : IRpcConnection, IDisposable

Constructors

Name Description
RpcConnection(IGenericLocation, ISession)

Construct a new RpcConnection based on a Qlik Sense location object and a session specification.

Properties

Name Description
CancellationToken

The token used to synchronize shutdown events with all outstanding tasks

InboundSerializer

The JsonSerializer used for deserializing incoming RPC messages.

MaxJsonDepth
OutboundSerializer

The JsonSerializer used for deserializing outgoing RPC messages.

RetryCountLimit

Maximum number of connection retry attempts performed when opening a websocket connection.

ServerUri

The Uri of the Qlik Sense server

Session

The session specification.

Timeout

Timeout value (in milliseconds) used for synchronous calls to engine. Usually used together with CancellationToken.

Methods

Name Description
Deserialize<T>(JToken)

Deserialize a token to a specific type.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Log(String)

Method to use when emitting a log message.

Log(String, String)

Post message to the DebugConsole. If no debug console is active, then the method has no effect.

MakeInboundSerializer()

Method for creating the JsonSerializer used to deserialize message received from the RPC connection. The method is called the first time the property InboundSerializer is accessed, which is typically when the method Deserialize<T>(JToken) is called.

MakeOutboundSerializer()

Method for creating the JsonSerializer used to serialize requests to an RPC connection. The method is called the first time the property OutboundSerializer is accessed, which is typically when the method SendAsync<T>(Request) is called.

SendAsync(Request)

Sends a request asynchronously to a Qlik Sense instance

SendAsync<T>(Request)
SendAsync<T>(Request, Func<Response, T>)

Sends a request asynchronously to a Qlik Sense instance with a specified response handler.

Events

Name Description
CommunicationErrorEvent

Event that fires when an exception occurs on the web socket or the socket is unexpectedly closed by the server.

ConnectionClosingEvent

Event that fires when a connection closes.

PushMessageEvent

Will catch all responses without registered receiver

PushMethodReceivedEvent

Event that is fired whenever a push method is received from Qlik Sense.

ResponseEvent

Event that is fired when a response is received on the web socket.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!