#import <MQTTPersistence.h>
The MQTTPersistence protocol is an abstraction of persistence classes for MQTTSession
◆ allFlowsforClientId:incomingFlag:()
- (NSArray *) allFlowsforClientId: |
|
(NSString *) |
clientId |
incomingFlag: |
|
(BOOL) |
incomingFlag |
|
|
| |
Retrieves all MQTTFlow elements of a clientId and direction
- Parameters
-
clientId | whos MQTTFlows should be retrieved |
incomingFlag | specifies the wether incoming or outgoing flows should be retrieved |
- Returns
- an NSArray of the retrieved MQTTFlow elements
◆ deleteAllFlowsForClientId:()
- (void) deleteAllFlowsForClientId: |
|
(NSString *) |
clientId |
|
Deletes all MQTTFlow elements of a clientId
- Parameters
-
clientId | the client Id identifying all MQTTFlows to be deleted |
◆ deleteFlow:()
- (void) deleteFlow: |
|
(id< MQTTFlow >) |
flow |
|
◆ flowforClientId:incomingFlag:messageId:()
- (id<MQTTFlow>) flowforClientId: |
|
(NSString *) |
clientId |
incomingFlag: |
|
(BOOL) |
incomingFlag |
messageId: |
|
(UInt16) |
messageId |
|
|
| |
Retrieves an MQTTFlow element
- Parameters
-
clientId | to which the MQTTFlow belongs to |
incomingFlag | specifies the direction of the flow |
messageId | specifies the message Id of the flow |
- 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 | identifying the session |
topic | the topic of the message |
data | the message's data |
retainFlag | the retain flag of the message |
qos | the quality of service of the message |
msgId | the id of the message or zero for qos zero |
incomingFlag | the direction of the message |
commandType | the command of the message |
deadline | the deadline of the message for repetitions |
- Returns
- the created MQTTFlow element or nil if the maxWindowSize has been exceeded
◆ 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 | identifying the session |
- Returns
- the current size of the outgoing inflight window
◆ maxMessages
- (NSUInteger) maxMessages |
|
readwritenonatomicassign |
The maximum number of messages kept per clientID and direction. Defaults to 1024
◆ maxSize
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
Indicates if the persistence implementation should make the information permannent. Defaults to NO
The documentation for this protocol was generated from the following file: