LSClientMessageDelegate Protocol Reference

Conforms to NSObject
Declared in LSClientMessageDelegate.h

Overview

Protocol to be implemented to receive [LSLightstreamerClient sendMessage:withSequence:timeout:delegate:enqueueWhileDisconnected:] events reporting a message processing outcome.

Events for these delegates are dispatched by a different thread than the one that generates them. All the notifications for a single LSLightstreamerClient, including notifications to LSClientDelegate, LSSubscriptionDelegate, LSClientMessageDelegate, LSMPNDeviceDelegate and LSMPNSubscriptionDelegate, will be dispatched by the same thread. Only one event per message is fired on this delegate.

– client:didAbortMessage:sentOnNetwork:

Event handler that is called by Lightstreamer when any notifications of the processing outcome of the related message haven’t been received yet and can no longer be received.

Typically, this happens after the session has been closed. In this case, the client has no way of knowing the processing outcome and any outcome is possible.

- (void)client:(nonnull LSLightstreamerClient *)client didAbortMessage:(nonnull NSString *)originalMessage sentOnNetwork:(BOOL)sentOnNetwork

Parameters

client

The LSLightstreamerClient instance.

originalMessage

The message to which this notification is related.

sentOnNetwork

YES if the message was sent on the network, NO otherwise. Even if the flag is YES, it is not possible to infer whether the message actually reached the Lightstreamer Server or not.

Declared In

LSClientMessageDelegate.h

– client:didDenyMessage:withCode:error:

Event handler that is called by Lightstreamer when the related message has been processed by the Server but the expected processing outcome could not be achieved for any reason.

- (void)client:(nonnull LSLightstreamerClient *)client didDenyMessage:(nonnull NSString *)originalMessage withCode:(NSInteger)code error:(nonnull NSString *)error

Parameters

client

The LSLightstreamerClient instance.

originalMessage

The message to which this notification is related.

code

The error code sent by the Server. The code value is dependent on the specific Metadata Adapter implementation.

error

The description of the error sent by the Server.

Declared In

LSClientMessageDelegate.h

– client:didDiscardMessage:

Event handler that is called by Lightstreamer to notify that the related message has been discarded by the Server.

This means that the message has not reached the Metadata Adapter and the message next in the sequence is considered enabled for processing.

- (void)client:(nonnull LSLightstreamerClient *)client didDiscardMessage:(nonnull NSString *)originalMessage

Parameters

client

The LSLightstreamerClient instance.

originalMessage

The message to which this notification is related.

Declared In

LSClientMessageDelegate.h

– client:didFailMessage:

Event handler that is called by Lightstreamer when the related message has been processed by the Server but the processing has failed for any reason.

The level of completion of the processing by the Metadata Adapter cannot be determined.

- (void)client:(nonnull LSLightstreamerClient *)client didFailMessage:(nonnull NSString *)originalMessage

Parameters

client

The LSLightstreamerClient instance.

originalMessage

The message to which this notification is related.

Declared In

LSClientMessageDelegate.h

– client:didProcessMessage:

Event handler that is called by Lightstreamer when the related message has been processed by the Server with success.

- (void)client:(nonnull LSLightstreamerClient *)client didProcessMessage:(nonnull NSString *)originalMessage

Parameters

client

The LSLightstreamerClient instance.

originalMessage

The message to which this notification is related.

Declared In

LSClientMessageDelegate.h