MQTTClient
an Objective-C Framework for MQTT
Instance Methods | Properties | List of all members
<MQTTPersistence> Protocol Reference

#import <MQTTPersistence.h>

Inheritance diagram for <MQTTPersistence>:
MQTTCoreDataPersistence MQTTInMemoryPersistence

Instance Methods

(NSUInteger) - windowSize:
 
(id< MQTTFlow >) - storeMessageForClientId:topic:data:retainFlag:qos:msgId:incomingFlag:commandType:deadline:
 
(void) - deleteFlow:
 
(void) - deleteAllFlowsForClientId:
 
(NSArray *) - allFlowsforClientId:incomingFlag:
 
(id< MQTTFlow >) - flowforClientId:incomingFlag:messageId:
 
(void) - sync
 

Properties

NSUInteger maxWindowSize
 
NSUInteger maxMessages
 
BOOL persistent
 
NSUInteger maxSize
 

Detailed Description

The MQTTPersistence protocol is an abstraction of persistence classes for MQTTSession

Method Documentation

§ allFlowsforClientId:incomingFlag:()

- (NSArray *) allFlowsforClientId: (NSString *)  clientId
incomingFlag: (BOOL)  incomingFlag 

Retrieves all MQTTFlow elements of a clientId and direction

Parameters
clientId
incomingFlag
Returns
an NSArray of the retrieved MQTTFlow elements

§ deleteAllFlowsForClientId:()

- (void) deleteAllFlowsForClientId: (NSString *)  clientId

Deletes all MQTTFlow elements of a clientId

Parameters
clientId

§ deleteFlow:()

- (void) deleteFlow: (id< MQTTFlow >)  flow

Deletes an MQTTFlow element

Parameters
flow

§ flowforClientId:incomingFlag:messageId:()

- (id<MQTTFlow>) flowforClientId: (NSString *)  clientId
incomingFlag: (BOOL)  incomingFlag
messageId: (UInt16)  messageId 

Retrieves an MQTTFlow element

Parameters
clientId
incomingFlag
messageId
Returns
the retrieved MQTTFlow element or nil if the elememt was not found

§ storeMessageForClientId:topic:data:retainFlag:qos:msgId:incomingFlag:commandType:deadline:()

- (id<MQTTFlow>) storeMessageForClientId: (NSString *)  clientId
topic: (NSString *)  topic
data: (NSData *)  data
retainFlag: (BOOL)  retainFlag
qos: (MQTTQosLevel)  qos
msgId: (UInt16)  msgId
incomingFlag: (BOOL)  incomingFlag
commandType: (UInt8)  commandType
deadline: (NSDate *)  deadline 

Stores one new message

Parameters
clientId
topic
data
retainFlag
qos
msgId
incomingFlag
commandType
deadline
Returns
the created MQTTFlow element or nil if the maxWindowSize has been exceeded

§ sync()

- (void) sync

sync is called to allow the MQTTPersistence implemetation to save data permanently

§ windowSize:()

- (NSUInteger) windowSize: (NSString *)  clientId

The current Window Size for outgoing inflight messages per clientID.

Parameters
clientId
Returns
the current size of the outgoing inflight window

Property Documentation

§ maxMessages

- (NSUInteger) maxMessages
readwritenonatomicassign

The maximum number of messages kept per clientID and direction. Defaults to 1024

§ maxSize

- (NSUInteger) maxSize
readwritenonatomicassign

The maximum size of the storage used for persistence in total in bytes. Defaults to 1024*1024 bytes

§ maxWindowSize

- (NSUInteger) maxWindowSize
readwritenonatomicassign

The maximum Window Size for outgoing inflight messages per clientID. Defaults to 16

§ persistent

- (BOOL) persistent
readwritenonatomicassign

Indicates if the persistence implementation should make the information permannent. Defaults to NO


The documentation for this protocol was generated from the following file: