AbstractKaaClient Class Reference

Inherits from NSObject
Conforms to GenericKaaClient
Declared in AbstractKaaClient.h
AbstractKaaClient.m

Overview

Abstract class that holds general elements of Kaa library.

This class creates and binds Kaa library modules. Public access to each module is performed using KaaClient interface.

Class contains abstract methods [AbstractKaaClient createHttpClientWithURLString:privateKeyRef:publicKeyRef:remoteKey:] and few more which are used to reference the platform-specific implementation of http client and Kaa’s state persistent storage.

Http client is used to provide basic communication with Bootstrap and Operation servers using HTTP protocol.

Other Methods

– buildChannelManagerWithBootstrapManager:servers:

- (id<KaaInternalChannelManager>)buildChannelManagerWithBootstrapManager:(id<BootstrapManager>)bootstrapManager servers:(NSDictionary *)bootstrapServers

Parameters

bootstrapServers

Dictionary with <TransportProtocolId, NSArray < TransportConnectionInfo >> as key-value

Discussion

Declared In

AbstractKaaClient.h

Other Methods

– start

Starts Kaa’s workflow.

- (void)start

Discussion

Starts Kaa’s workflow.

Declared In

GenericKaaClient.h

– stop

Stops Kaa’s workflow.

- (void)stop

Discussion

Stops Kaa’s workflow.

Declared In

GenericKaaClient.h

– pause

Pauses Kaa’s workflow.

- (void)pause

Discussion

Pauses Kaa’s workflow.

Declared In

GenericKaaClient.h

– resume

Resumes Kaa’s workflow.

- (void)resume

Discussion

Resumes Kaa’s workflow.

Declared In

GenericKaaClient.h

– setLogDeliveryDelegate:

Set a delegate which receives a delivery status of each log bucket.

- (void)setLogDeliveryDelegate:(id<LogDeliveryDelegate>)delegate

Discussion

Set a delegate which receives a delivery status of each log bucket.

Declared In

GenericKaaClient.h

– setProfileContainer:

Sets profile container implemented by the user.

- (void)setProfileContainer:(id<ProfileContainer>)container

Discussion

Sets profile container implemented by the user.

Declared In

GenericKaaClient.h

– updateProfile

Sync of updated profile with server

- (void)updateProfile

Discussion

Sync of updated profile with server

Declared In

GenericKaaClient.h

– setConfigurationStorage:

Sets the configuration storage that will be used to persist configuration.

- (void)setConfigurationStorage:(id<ConfigurationStorage>)storage

Discussion

Sets the configuration storage that will be used to persist configuration.

Declared In

GenericKaaClient.h

– addConfigurationDelegate:

Register configuration update delegate

- (void)addConfigurationDelegate:(id<ConfigurationDelegate>)delegate

Discussion

Register configuration update delegate

Declared In

GenericKaaClient.h

– removeConfigurationDelegate:

Removes configuration update delegate

- (void)removeConfigurationDelegate:(id<ConfigurationDelegate>)delegate

Discussion

Removes configuration update delegate

Declared In

GenericKaaClient.h

– getTopics

Retrieve an array of available notification topics.

- (NSArray *)getTopics

Return Value

Array of available topics Topic

Discussion

Retrieve an array of available notification topics.

Declared In

GenericKaaClient.h

– addTopicListDelegate:

Add delegate for notification topics' list updates.

- (void)addTopicListDelegate:(id<NotificationTopicListDelegate>)delegate

Discussion

Add delegate for notification topics' list updates.

Declared In

GenericKaaClient.h

– removeTopicListDelegate:

Remove delegate of notification topics' list updates.

- (void)removeTopicListDelegate:(id<NotificationTopicListDelegate>)delegate

Discussion

Remove delegate of notification topics' list updates.

Declared In

GenericKaaClient.h

– addNotificationDelegate:

Add delegate to receive all notifications (both for mandatory and optional topics).

- (void)addNotificationDelegate:(id<NotificationDelegate>)delegate

Discussion

Add delegate to receive all notifications (both for mandatory and optional topics).

Declared In

GenericKaaClient.h

– addNotificationDelegate:forTopicId:

Add delegate to receive notifications relating to the specified topic.
Delegate(s) for optional topics may be added/removed irrespective to whether subscription existed or not.

- (void)addNotificationDelegate:(id<NotificationDelegate>)delegate forTopicId:(int64_t)topicId

Discussion

Add delegate to receive notifications relating to the specified topic.
Delegate(s) for optional topics may be added/removed irrespective to whether subscription existed or not.

Exceptions

UnavailableTopicException

Unknown topic id is provided.

Declared In

GenericKaaClient.h

– removeNotificationDelegate:

Remove delegate receiving all notifications (both for mandatory and optional topics).

- (void)removeNotificationDelegate:(id<NotificationDelegate>)delegate

Discussion

Remove delegate receiving all notifications (both for mandatory and optional topics).

Declared In

GenericKaaClient.h

– removeNotificationDelegate:forTopicId:

Remove delegate receiving notifications for the specified topic.
Delegate(s) for optional topics may be added/removed irrespective to whether subscription existed or not.

- (void)removeNotificationDelegate:(id<NotificationDelegate>)delegate forTopicId:(int64_t)topicId

Parameters

topicId

ID of topic (both mandatory and optional).

Discussion

Remove delegate receiving notifications for the specified topic.
Delegate(s) for optional topics may be added/removed irrespective to whether subscription existed or not.

Exceptions

UnavailableTopicException

Unknown topic id is provided.

Declared In

GenericKaaClient.h

– subscribeToTopicWithId:

Subscribe to notifications relating to the specified optional topic.

- (void)subscribeToTopicWithId:(int64_t)topicId

Parameters

topicId

ID of a optional topic.

Discussion

Subscribe to notifications relating to the specified optional topic.

Exceptions

UnavailableTopicException

Unknown topic id is provided or topic isn’t optional.

Declared In

GenericKaaClient.h

– subscribeToTopicWithId:forceSync:

Subscribe to notifications relating to the specified optional topic.

- (void)subscribeToTopicWithId:(int64_t)topicId forceSync:(BOOL)forceSync

Parameters

topicId

ID of an optional topic.

forceSync

Define whether current subscription update should be accepted immediately.

Discussion

Subscribe to notifications relating to the specified optional topic.

Exceptions

UnavailableTopicException

Unknown topic id is provided or topic isn’t optional.

Declared In

GenericKaaClient.h

– subscribeToTopicsWithIDs:

Subscribe to notifications relating to the specified array of optional topics.

- (void)subscribeToTopicsWithIDs:(NSArray *)topicIds

Parameters

topicIds

Array of optional topic IDs. <int64_t>

Discussion

Subscribe to notifications relating to the specified array of optional topics.

Exceptions

UnavailableTopicException

Unknown topic id is provided or topic isn’t optional.

Declared In

GenericKaaClient.h

– subscribeToTopicsWithIDs:forceSync:

Subscribe to notifications relating to the specified array of optional topics.

- (void)subscribeToTopicsWithIDs:(NSArray *)topicIds forceSync:(BOOL)forceSync

Parameters

topicIds

Array of optional topic IDs. <int64_t>

forceSync

Define whether current subscription update should be accepted immediately.

Discussion

Subscribe to notifications relating to the specified array of optional topics.

Exceptions

UnavailableTopicException

Unknown topic id is provided or topic isn’t optional.

Declared In

GenericKaaClient.h

– unsubscribeFromTopicWithId:

Unsubscribe from notifications relating to the specified optional topic. All previously added delegates will be removed automatically.

- (void)unsubscribeFromTopicWithId:(int64_t)topicId

Parameters

topicId

ID of optional topic.

Discussion

Unsubscribe from notifications relating to the specified optional topic. All previously added delegates will be removed automatically.

Exceptions

UnavailableTopicException

Unknown topic id is provided or topic isn’t optional.

Declared In

GenericKaaClient.h

– unsubscribeFromTopicWithId:forceSync:

Unsubscribe from notifications relating to the specified optional topic. All previously added delegates will be removed automatically.

- (void)unsubscribeFromTopicWithId:(int64_t)topicId forceSync:(BOOL)forceSync

Parameters

topicId

ID of optional topic.

forceSync

Define whether current subscription update should be accepted immediately.

Discussion

Unsubscribe from notifications relating to the specified optional topic. All previously added delegates will be removed automatically.

Exceptions

UnavailableTopicException

Unknown topic id is provided or topic isn’t optional.

Declared In

GenericKaaClient.h

– unsubscribeFromTopicsWithIDs:

Unsubscribe from notifications relating to the specified array of optional topics. All previously added delegates will be removed automatically.

- (void)unsubscribeFromTopicsWithIDs:(NSArray *)topicIds

Parameters

topicIds

Array of optional topic IDs. <int64_t>

Discussion

Unsubscribe from notifications relating to the specified array of optional topics. All previously added delegates will be removed automatically.

Exceptions

UnavailableTopicException

Unknown topic id is provided or topic isn’t optional.

Declared In

GenericKaaClient.h

– unsubscribeFromTopicsWithIDs:forceSync:

Unsubscribe from notifications relating to the specified array of optional topics. All previously added delegates will be removed automatically.

- (void)unsubscribeFromTopicsWithIDs:(NSArray *)topicIds forceSync:(BOOL)forceSync

Parameters

topicIds

Array of optional topic IDs. <int64_t>

forceSync

Define whether current subscription update should be accepted immediately.

Discussion

Unsubscribe from notifications relating to the specified array of optional topics. All previously added delegates will be removed automatically.

Exceptions

UnavailableTopicException

Unknown topic id is provided or topic isn’t optional.

Declared In

GenericKaaClient.h

– syncTopicsList

Force sync of pending subscription changes with server.

- (void)syncTopicsList

Discussion

Force sync of pending subscription changes with server.

Declared In

GenericKaaClient.h

– setLogStorage:

Set user implementation of a log storage.

- (void)setLogStorage:(id<LogStorage>)storage

Discussion

Set user implementation of a log storage.

Declared In

GenericKaaClient.h

– setLogUploadStrategy:

Set user implementation of a log upload strategy.

- (void)setLogUploadStrategy:(id<LogUploadStrategy>)strategy

Discussion

Set user implementation of a log upload strategy.

Declared In

GenericKaaClient.h

– getEventFamilyFactory

Retrieves Kaa event family factory.

- (EventFamilyFactory *)getEventFamilyFactory

Discussion

Retrieves Kaa event family factory.

Declared In

GenericKaaClient.h

– findListenersForEventFQNs:delegate:

Submits an event delegates resolution request.

- (void)findListenersForEventFQNs:(NSArray *)eventFQNs delegate:(id<FindEventListenersDelegate>)delegate

Parameters

eventFQNs

Array of event class FQNs which have to be supported by endpoint.

Discussion

Submits an event delegates resolution request.

Declared In

GenericKaaClient.h

– getChannelManager

Retrieves Kaa channel manager.

- (id<KaaChannelManager>)getChannelManager

Discussion

Retrieves Kaa channel manager.

Declared In

GenericKaaClient.h

– getClientPrivateKey

Retrieves the client’s private key.
Required in user implementation of an operation data channel. Private key is used by encryption schema between endpoint and servers.

- (SecKeyRef)getClientPrivateKey

Return Value

Client’s private key

Discussion

Retrieves the client’s private key.
Required in user implementation of an operation data channel. Private key is used by encryption schema between endpoint and servers.

Declared In

GenericKaaClient.h

– getClientPublicKey

Retrieves the client’s public key.
Required in user implementation of an operation data channel. Public key hash (SHA-1) is used by servers as identification number to uniquely identify each connected endpoint.

- (SecKeyRef)getClientPublicKey

Discussion

Retrieves the client’s public key.
Required in user implementation of an operation data channel. Public key hash (SHA-1) is used by servers as identification number to uniquely identify each connected endpoint.

Declared In

GenericKaaClient.h

– getEndpointKeyHash

Retrieves endpoint public key hash.
Required in EndpointRegistrationManager implementation to react on detach response from Operations server.

- (NSString *)getEndpointKeyHash

Return Value

NSString containing current endpoint’s public key hash.

Discussion

Retrieves endpoint public key hash.
Required in EndpointRegistrationManager implementation to react on detach response from Operations server.

Declared In

GenericKaaClient.h

– setEndpointAccessToken:

Set new access token for a current endpoint.

- (void)setEndpointAccessToken:(NSString *)token

Discussion

Set new access token for a current endpoint.

Declared In

GenericKaaClient.h

– refreshEndpointAccessToken

Generate new access token for a current endpoint.

- (NSString *)refreshEndpointAccessToken

Discussion

Generate new access token for a current endpoint.

Declared In

GenericKaaClient.h

– getEndpointAccessToken

Retrieve an access token for a current endpoint.

- (NSString *)getEndpointAccessToken

Discussion

Retrieve an access token for a current endpoint.

Declared In

GenericKaaClient.h

– attachEndpointWithAccessToken:delegate:

Updates with new endpoint attach request
OnAttachEndpointOperationCallback is populated with EndpointKeyHash of an attached endpoint.

- (void)attachEndpointWithAccessToken:(EndpointAccessToken *)endpointAccessToken delegate:(id<OnAttachEndpointOperationDelegate>)delegate

Parameters

endpointAccessToken

Access token of the attaching endpoint

delegate

Delegate to notify about result of the endpoint attaching

Discussion

Updates with new endpoint attach request
OnAttachEndpointOperationCallback is populated with EndpointKeyHash of an attached endpoint.

Declared In

GenericKaaClient.h

– detachEndpointWithKeyHash:delegate:

Updates with new endpoint detach request

- (void)detachEndpointWithKeyHash:(EndpointKeyHash *)endpointKeyHash delegate:(id<OnDetachEndpointOperationDelegate>)delegate

Parameters

endpointKeyHash

Key hash of the detaching endpoint

delegate

Delegate to notify about result of the enpoint attaching

Discussion

Updates with new endpoint detach request

Declared In

GenericKaaClient.h

– attachUserWithId:accessToken:delegate:

Creates user attach request using default verifier. Default verifier is selected during SDK generation. If there was no default verifier selected this method will throw runtime exception.

- (void)attachUserWithId:(NSString *)userExternalId accessToken:(NSString *)userAccessToken delegate:(id<UserAttachDelegate>)delegate

Discussion

Creates user attach request using default verifier. Default verifier is selected during SDK generation. If there was no default verifier selected this method will throw runtime exception.

Declared In

GenericKaaClient.h

– attachUserWithVerifierToken:userId:accessToken:delegate:

Creates user attach request using specified verifier.

- (void)attachUserWithVerifierToken:(NSString *)userVerifierToken userId:(NSString *)userExternalId accessToken:(NSString *)userAccessToken delegate:(id<UserAttachDelegate>)delegate

Discussion

Creates user attach request using specified verifier.

Declared In

GenericKaaClient.h

– isAttachedToUser

Checks if current endpoint is attached to user.

- (BOOL)isAttachedToUser

Discussion

Checks if current endpoint is attached to user.

Declared In

GenericKaaClient.h

– setAttachDelegate:

Sets callback for notifications when current endpoint is attached to user.

- (void)setAttachDelegate:(id<AttachEndpointToUserDelegate>)delegate

Discussion

Sets callback for notifications when current endpoint is attached to user.

Declared In

GenericKaaClient.h

– setDetachDelegate:

Sets callback for notifications when current endpoint is detached from user.

- (void)setDetachDelegate:(id<DetachEndpointFromUserDelegate>)delegate

Discussion

Sets callback for notifications when current endpoint is detached from user.

Declared In

GenericKaaClient.h

– setFailoverStrategy:

strategy that will be used to resolve failovers.

- (void)setFailoverStrategy:(id<FailoverStrategy>)failoverStrategy

Parameters

failoverStrategy

strategy that will be used to resolve failovers.

See Also

Declared In

GenericKaaClient.h

– setFailureDelegate:

Set listener which is notified on critical failures that are treated as something that client should not handle on its own.

- (void)setFailureDelegate:(id<FailureDelegate>)failureDelegate

Parameters

delegate

delegate to handle critical failures

Discussion

Set listener which is notified on critical failures that are treated as something that client should not handle on its own.

Declared In

GenericKaaClient.h