MigratoryData Client API for iOS
Developer's Guide and Reference Manual
MigratoryDataMessage Class Reference

Represent a message. More...

Inheritance diagram for MigratoryDataMessage:

Instance Methods

(id) - init:content:
 Create a MigratoryDataMessage object. More...
 
(id) - init:content:fields:
 Create a MigratoryDataMessage object. More...
 
(id) - init:content:closure:
 Create a MigratoryDataMessage object. More...
 
(id) - init:content:fields:closure:
 Create a MigratoryDataMessage object. More...
 
(NSString *) - getSubject
 Get the subject of the message. More...
 
(NSString *) - getContent
 Get the content of the message. More...
 
(NSArray *) - getFields
 Get the fields of the message. More...
 
(NSString *) - getClosure
 Get the closure of the message. More...
 
(bool) - isSnapshot
 Test whether the message is a snapshot message or not. More...
 
(NSString *) - getReplyToSubject
 
(void) - setReplyToSubject:
 

Detailed Description

Represent a message.

Method Documentation

◆ init:content:()

- (id) init: (NSString *)  subject
content: (NSString *)  content 

Create a MigratoryDataMessage object.

Parameters
subjectThe subject of the message
contentThe content of the message

◆ init:content:fields:()

- (id) init: (NSString *)  subject
content: (NSString *)  content
fields: (NSArray *)  fields 

Create a MigratoryDataMessage object.

Parameters
subjectThe subject of the message
contentThe content of the message
fieldsThe fields of the message

◆ init:content:closure:()

- (id) init: (NSString *)  subject
content: (NSString *)  content
closure: (NSString *)  closure 

Create a MigratoryDataMessage object.

Parameters
subjectThe subject of the message
contentThe content of the message
closureThe closure of the message

◆ init:content:fields:closure:()

- (id) init: (NSString *)  subject
content: (NSString *)  content
fields: (NSArray *)  fields
closure: (NSString *)  closure 

Create a MigratoryDataMessage object.

Parameters
subjectThe subject of the message
contentThe content of the message
fieldsThe fields of the message
closureThe closure of the message

◆ getSubject()

- (NSString *) getSubject

Get the subject of the message.

Returns
A string representing the subject of the message

◆ getContent()

- (NSString *) getContent

Get the content of the message.

Returns
A string representing the content of the message

◆ getFields()

- (NSArray *) getFields

Get the fields of the message.

Returns
The fields of the message as a list of MigratoryDataField objects

◆ getClosure()

- (NSString *) getClosure

Get the closure of the message.

Returns
The closure data of the message

◆ isSnapshot()

- (bool) isSnapshot

Test whether the message is a snapshot message or not.

Returns
true if the message is a snapshot message

◆ getReplyToSubject()

- (NSString *) getReplyToSubject

Get the subject to be used to reply to this message.

A client which receives a message containing a reply subject should interpret the message as a request. It has the option to use the reply subject - extracted from the message with this method - to send a reply.

Returns
The subject to be used to reply to this message.

◆ setReplyToSubject:()

- (void) setReplyToSubject: (NSString *)  replyToSubject

Set the subject to be used to reply to this message.

If a reply subject is attached to a message with this method, the message acts as a request. The clients which receive a request message will be able to reply by sending a message having as subject the reply subject.

If the reply subject is not already subscribed, it is subscribed by the API library implicitly. It can be reused for subsequent request/reply interactions (and even for receiving multiple replies to one request). When it is not needed anymore, it should be unsubscribed explicitly.

Parameters
subjectThe subject to be used to reply to this message.