Protocols
The following protocols are available globally.
-
Messages related to the ARTAuth
See moreDeclaration
Objective-C
@protocol ARTAuthDelegate <NSObject>Swift
protocol ARTAuthDelegate : NSObjectProtocol -
Undocumented
See moreDeclaration
Objective-C
@protocol ARTChannelsDelegate <NSObject> - (id)makeChannel:(NSString *)channel options:(nullable ARTChannelOptions *)options; @endSwift
protocol ARTChannelsDelegate : NSObjectProtocol -
Undocumented
See moreDeclaration
Objective-C
@protocol ARTChannelCipher - (ARTStatus *)encrypt:(NSData *)plaintext output:(NSData *_Nullable *_Nullable)output; - (ARTStatus *)decrypt:(NSData *)ciphertext output:(NSData *_Nullable *_Nullable)output; - (nullable NSString *)cipherName; - (size_t) keyLength; @endSwift
protocol ARTChannelCipher -
Checks an
ARTErrorInfoto see whether it falls into a given class of errors defined by the client library specification.In addition to putting shared error logic in a common place, it allows us to provide a mock instance when testing components that need to perform error checking, without having to worry about creating representative errors in our test cases.
See moreDeclaration
Objective-C
@protocol ARTErrorCheckerSwift
protocol ErrorChecker -
ARTInternalLogCoreis the type underlyingARTInternalLog, and defines the logging functionality available to components of the SDK.It’s responsible for receiving log messages from SDK components, performing additional processing on these messages, and forwarding the result to an object conforming to the
ARTVersion2Logprotocol.This protocol exists to give internal SDK components access to a rich and useful logging interface, whilst minimising the complexity (and hence the implementation burden for users of the SDK) of the
ARTVersion2Logprotocol. It also allows us to evolve the logging interface used internally without introducing breaking changes for users of the SDK.The initial interface of
See moreARTInternalLogCoremore or less mirrors that of theARTLogclass, for compatibility with existing internal SDK code. However, it will evolve as we gather requirements for the information logged by the SDK — see issues #1623 and #1624.Declaration
Objective-C
@protocol ARTInternalLogCore <NSObject>Swift
protocol InternalLogCore : NSObjectProtocol -
An object which generates the random “jitter coefficient” used to determine when the library will next retry an operation.
See moreDeclaration
Objective-C
@protocol ARTJitterCoefficientGeneratorSwift
protocol JitterCoefficientGenerator -
Undocumented
See moreDeclaration
Objective-C
@protocol ARTJsonLikeEncoderDelegate <NSObject> - (NSString *)mimeType; - (ARTEncoderFormat)format; - (NSString *)formatAsString; - (nullable id)decode:(NSData *)data error:(NSError * _Nullable __autoreleasing * _Nullable)error; - (nullable NSData *)encode:(id)obj error:(NSError * _Nullable __autoreleasing * _Nullable)error; @endSwift
protocol ARTJsonLikeEncoderDelegate : NSObjectProtocol -
Undocumented
See moreDeclaration
Objective-C
@protocol ARTReachability <NSObject> - (instancetype)initWithLogger:(ARTInternalLog *)logger queue:(dispatch_queue_t)queue; - (void)listenForHost:(NSString *)host callback:(void (^)(BOOL))callback; - (void)off; @endSwift
protocol ARTReachability : NSObjectProtocol -
Undocumented
See moreDeclaration
Objective-C
@protocol ARTRealtimeTransportDelegate // All methods must be called from rest's serial queue. - (void)realtimeTransport:(id<ARTRealtimeTransport>)transport didReceiveMessage:(ARTProtocolMessage *)message; - (void)realtimeTransportAvailable:(id<ARTRealtimeTransport>)transport; - (void)realtimeTransportClosed:(id<ARTRealtimeTransport>)transport; - (void)realtimeTransportDisconnected:(id<ARTRealtimeTransport>)transport withError:(nullable ARTRealtimeTransportError *)error; - (void)realtimeTransportNeverConnected:(id<ARTRealtimeTransport>)transport; - (void)realtimeTransportRefused:(id<ARTRealtimeTransport>)transport withError:(nullable ARTRealtimeTransportError *)error; - (void)realtimeTransportTooBig:(id<ARTRealtimeTransport>)transport; - (void)realtimeTransportFailed:(id<ARTRealtimeTransport>)transport withError:(ARTRealtimeTransportError *)error; - (void)realtimeTransportSetMsgSerial:(id<ARTRealtimeTransport>)transport msgSerial:(int64_t)msgSerial; @endSwift
protocol ARTRealtimeTransportDelegate -
Undocumented
See moreDeclaration
Objective-C
@protocol ARTRealtimeTransport // All methods must be called from rest's serial queue. @property (readonly, nonatomic) NSString *resumeKey; @property (readonly, nonatomic) ARTRealtimeTransportState state; @property (nullable, readwrite, nonatomic) id<ARTRealtimeTransportDelegate> delegate; @property (nonatomic, readonly) ARTEventEmitter<ARTEvent *, id> *stateEmitter; - (BOOL)send:(NSData *)data withSource:(nullable id)decodedObject; - (void)receive:(ARTProtocolMessage *)msg; - (nullable ARTProtocolMessage *)receiveWithData:(NSData *)data; - (void)connectWithKey:(NSString *)key; - (void)connectWithToken:(NSString *)token; - (void)sendClose; - (void)sendPing; - (void)close; - (void)abort:(ARTStatus *)reason; - (NSString *)host; - (void)setHost:(NSString *)host; - (ARTRealtimeTransportState)state; @endSwift
protocol ARTRealtimeTransport -
A factory for creating an
See moreARTRealtimeTransportinstance.Declaration
Objective-C
@protocol ARTRealtimeTransportFactorySwift
protocol RealtimeTransportFactory -
Consider an operation which can fail. If we attempt to perform the operation and it fails, we may wish to start performing a sequence of retries, until success or some other termination condition is achieved. An
See moreARTRetryDelayCalculatordescribes the amount of time that we wish to wait before performing each retry in this sequence.Declaration
Objective-C
@protocol ARTRetryDelayCalculatorSwift
protocol RetryDelayCalculator -
Protocol for summary types that can initialize from NSDictionary. Similar to how ARTJsonLikeEncoder parses dictionaries.
See moreDeclaration
Objective-C
@protocol ARTDictionarySerializable <NSObject>Swift
protocol ARTDictionarySerializable : NSObjectProtocol, Sendable -
Undocumented
See moreDeclaration
Objective-C
@protocol ARTURLSession <NSObject> @property (readonly) dispatch_queue_t queue; - (instancetype)init:(dispatch_queue_t)queue; - (NSObject<ARTCancellable> *)get:(NSURLRequest *)request completion:(ARTURLRequestCallback)callback; - (void)finishTasksAndInvalidate; @endSwift
protocol ARTURLSession : NSObjectProtocol -
The
ARTVersion2Logprotocol represents a logger object that handles data emitted by the SDK’s logging system. It will be renamedARTLogin the next major release of the SDK (replacing the existing class), at which point users of the SDK will need to provide an implementation of this protocol if they wish to replace the SDK’s default logger.The initial interface of
ARTVersion2Logis based on that of theARTLogclass. However, its design will evolve as we gather further information about the following things:Requirements for the information logged by the SDK — see issues #1623 and #1624.
Requirements for the data emitted by the SDK’s logging system — see issues #1618 and #1625.
Declaration
Objective-C
@protocol ARTVersion2Log <NSObject>Swift
protocol Version2Log : NSObjectProtocol -
This protocol has the subset of ARTSRWebSocket we actually use.
See moreDeclaration
Objective-C
@protocol ARTWebSocket <NSObject>Swift
protocol ARTWebSocket : NSObjectProtocol -
The
ARTWebSocketDelegateprotocol describes the methods thatARTWebSocketobjects call on their delegates to handle status and messsage events.This protocol was previously in the SocketRocket library and named ARTSRWebSocketDelegate; all documentation comments have been copied verbatim.
See moreDeclaration
Objective-C
@protocol ARTWebSocketDelegate <NSObject>Swift
protocol ARTWebSocketDelegate : NSObjectProtocol -
A factory for creating an
See moreARTWebSocketobject.Declaration
Objective-C
@protocol ARTWebSocketFactorySwift
protocol WebSocketFactory -
The protocol upon which
See moreARTRestChannelProtocolandARTRealtimeChannelProtocolare based.Declaration
Objective-C
@protocol ARTChannelProtocolSwift
protocol ARTChannelProtocol -
The protocol upon which the
See moreARTConnectionis implemented. Also embedsARTEventEmitter.Declaration
Objective-C
@protocol ARTConnectionProtocol <NSObject>Swift
protocol ARTConnectionProtocol : NSObjectProtocol -
The interface for handling Push activation/deactivation-related actions.
See moreDeclaration
Objective-C
@protocol ARTPushRegistererDelegateSwift
protocol ARTPushRegistererDelegate -
The protocol upon which the
See moreARTPushAdminis implemented.Declaration
Objective-C
@protocol ARTPushAdminProtocolSwift
protocol ARTPushAdminProtocol -
The protocol upon which the
See moreARTPushChannelis implemented.Declaration
Objective-C
@protocol ARTPushChannelProtocolSwift
protocol ARTPushChannelProtocol -
The protocol upon which the
See moreARTPushChannelSubscriptionsis implemented.Declaration
Objective-C
@protocol ARTPushChannelSubscriptionsProtocolSwift
protocol ARTPushChannelSubscriptionsProtocol -
The protocol upon which the
See moreARTPushDeviceRegistrationsis implemented.Declaration
Objective-C
@protocol ARTPushDeviceRegistrationsProtocolSwift
protocol ARTPushDeviceRegistrationsProtocol -
This protocol contains the non-initializer instance methods provided by the
See moreARTRealtimeclient class.Declaration
Objective-C
@protocol ARTRealtimeInstanceMethodsProtocol <NSObject>Swift
protocol ARTRealtimeInstanceMethodsProtocol : NSObjectProtocol -
The protocol upon which the top level object
See moreARTRealtimeis implemented.Declaration
Objective-C
@protocol ARTRealtimeProtocol <ARTRealtimeInstanceMethodsProtocol>Swift
protocol ARTRealtimeProtocol : ARTRealtimeInstanceMethodsProtocol -
The protocol upon which the
See moreARTRealtimeAnnotationsis implemented.Declaration
Objective-C
@protocol ARTRealtimeAnnotationsProtocolSwift
protocol ARTRealtimeAnnotationsProtocol -
The protocol upon which the
See moreARTRealtimeChannelis implemented. Also embedsARTEventEmitter.Declaration
Objective-C
@protocol ARTRealtimeChannelProtocol <ARTChannelProtocol>Swift
protocol ARTRealtimeChannelProtocol : ARTChannelProtocol -
The protocol upon which the
See moreARTRealtimePresenceis implemented.Declaration
Objective-C
@protocol ARTRealtimePresenceProtocolSwift
protocol ARTRealtimePresenceProtocol -
Declaration
Objective-C
@protocol ARTRestProtocol <ARTRestInstanceMethodsProtocol>Swift
protocol ARTRestProtocol : ARTRestInstanceMethodsProtocol -
The protocol upon which the
See moreARTRestAnnotationsis implemented.Declaration
Objective-C
@protocol ARTRestAnnotationsProtocolSwift
protocol ARTRestAnnotationsProtocol -
The protocol upon which the
See moreARTRestChannelis implemented.Declaration
Objective-C
@protocol ARTRestChannelProtocol <ARTChannelProtocol>Swift
protocol ARTRestChannelProtocol : ARTChannelProtocol -
The protocol upon which the
See moreARTRestPresenceis implemented.Declaration
Objective-C
@protocol ARTRestPresenceProtocolSwift
protocol ARTRestPresenceProtocol
Protocols Reference