EMOobMessageManager Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | EMOobMessageManager.h |
Overview
This manager provides a way to create outgoing messages for the server and; fetch messages from or send messages to the server.
Create messages
– createUserToProviderMessageWithLocale:createTime:subject:from:to:replyTo:threadId:contentType:content:attachments:meta:
required method
Creates an outgoing user-to-provider message.
- (id<EMOobUserToProviderMessage>)createUserToProviderMessageWithLocale:(NSString *)aLocale createTime:(NSTimeInterval)aCreateTime subject:(id<EMSecureString>)aSubject from:(NSString *)aFrom to:(NSString *)aTo replyTo:(NSString *)aReplyTo threadId:(NSString *)aThreadId contentType:(NSString *)aContentType content:(id<EMSecureByteArray>)aContent attachments:(NSArray *)anAttachments meta:(NSDictionary *)aMetaParameters
aLocale |
Locale to use to handle messages. |
|---|---|
aCreateTime |
Message creation time. If |
aSubject |
Message subject. |
aFrom |
Message originator. Can be |
aTo |
Message recipient. |
aReplyTo |
Message recipient to use in case a response is send by the server. Can be |
aThreadId |
Message thread identifier. |
aContentType |
Message content-type. |
aContent |
Message content. |
anAttachments |
Array of attachments to the message. Can be |
aMeta |
Meta data for the message. Can be |
Return Value
The user-to-provider message to be sent.
Availability
3.0
Declared In
EMOobMessageManager.h
– createUserMessageAttachmentWithSubject:contentType:content:meta:
required method
Creates a user message attachment.
- (id<EMOobUserMessageAttachment>)createUserMessageAttachmentWithSubject:(id<EMSecureString>)aSubject contentType:(NSString *)aContentType content:(id<EMSecureByteArray>)aContent meta:(NSDictionary *)aMetaParameters
aSubject |
Message subject. |
|---|---|
aContentType |
Message content-type. |
aContent |
Message content. |
aMeta |
Meta data for the message. Can be |
Return Value
The user message attachment to be sent.
Availability
3.0
Declared In
EMOobMessageManager.h
– createGenericOutgoingMessageWithContentType:content:
required method
Creates a generic message.
- (id<EMOobGenericOutgoingMessage>)createGenericOutgoingMessageWithContentType:(NSString *)aContentType content:(id<EMSecureByteArray>)aContentParameters
aContentType |
Message content-type. |
|---|---|
aContent |
Message content. |
Return Value
The generic outgoing message to be sent.
Availability
3.0
Declared In
EMOobMessageManager.h
– createOobErrorWithErrorCode:errorDescription:errorStackTrace:externalRef:meta:
required method
Creates an error message to be sent as a response.
- (id<EMOobErrorMessage>)createOobErrorWithErrorCode:(int)anErrorCode errorDescription:(NSString *)anErrorDescription errorStackTrace:(NSString *)anErrorStackTrace externalRef:(NSString *)anExternalRef meta:(NSDictionary *)aMetaParameters
anErrorCode |
Error code. |
|---|---|
anErrorDescription |
Error description. |
anErrorStackTrace |
Error stack trace. Can be |
anExternalRef |
Any external reference. Can be |
aMeta |
Meta data for the message. Can be |
Return Value
The error message to be sent.
Availability
3.0
Declared In
EMOobMessageManager.h
– createOobErrorWithErrorCode:errorDescription:exception:externalRef:meta:
required method
Creates an error message to be sent as a response.
- (id<EMOobErrorMessage>)createOobErrorWithErrorCode:(int)anErrorCode errorDescription:(NSString *)anErrorDescription exception:(NSException *)anException externalRef:(NSString *)anExternalRef meta:(NSDictionary *)aMetaParameters
anErrorCode |
Error code. |
|---|---|
anErrorDescription |
Error description. |
anException |
NSException object. Can be |
anExternalRef |
Any external reference. Can be |
aMeta |
Meta data for the message. Can be |
Return Value
The error message to be sent.
Availability
3.0
Declared In
EMOobMessageManager.h
Fetch Messages
– fetchWithTimeout:error:
required method
Fetches a message from the server. This method retrieves the first message from server queue.
- (id<EMOobFetchMessageResponse>)fetchWithTimeout:(NSInteger)aTimeout error:(NSError **)anErrorParameters
aTimeout |
Maximum time in seconds to wait for an incoming message. |
|---|---|
anError |
If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in |
Return Value
The incoming message response if any.
Availability
3.0
Discussion
Warning: This method blocks the calling thread potentially for a very long time (like tens of seconds or even more, depending on the quality of the mobile network connection).
Declared In
EMOobMessageManager.h
– fetchWithTimeout:requestParameter:error:
required method
Fetches a message from the server. This method retrieves the first message from server queue.
- (id<EMOobFetchMessageResponse>)fetchWithTimeout:(NSInteger)aTimeout requestParameter:(EMOobRequestParameter *)aParam error:(NSError **)anErrorParameters
aTimeout |
Maximum time in seconds to wait for an incoming message. |
|---|---|
aParam |
The request parameter object carrying the additional parameters, i.e. custom HTTP headers. |
anError |
If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in |
Return Value
The incoming message response if any.
Availability
4.7
Discussion
Warning: This method blocks the calling thread potentially for a very long time (like tens of seconds or even more, depending on the quality of the mobile network connection).
Declared In
EMOobMessageManager.h
– fetchWithTimeout:completionHandler:
required method
Fetches a message from the server. This method retrieves the first message from server queue.
- (void)fetchWithTimeout:(int)aTimeout completionHandler:(void ( ^ ) ( id<EMOobFetchMessageResponse> aResponse , NSError *anError ))aCompletionHandlerParameters
aTimeout |
Maximum time in seconds to wait for an incoming message. |
|---|---|
aCompletionHandler |
The block to invoke on the main thread upon completion which contains the response and error information if any. |
Availability
3.0
Discussion
Warning: This method is executed asynchronously
Declared In
EMOobMessageManager.h
– fetchWithTimeout:requestParameter:completionHandler:
required method
Fetches a message from the server. This method retrieves the first message from server queue.
- (void)fetchWithTimeout:(int)aTimeout requestParameter:(EMOobRequestParameter *)aParam completionHandler:(void ( ^ ) ( id<EMOobFetchMessageResponse> aResponse , NSError *anError ))aCompletionHandlerParameters
aTimeout |
Maximum time in seconds to wait for an incoming message. |
|---|---|
aParam |
The request parameter object carrying the additional parameters, i.e. custom HTTP headers. |
aCompletionHandler |
The block to invoke on the main thread upon completion which contains the response and error information if any. |
Availability
4.7
Discussion
Warning: This method is executed asynchronously
Declared In
EMOobMessageManager.h
– fetchWithMessageId:error:
required method
Fetches a message from the server. This method retrieves a message with a specific identifier.
- (id<EMOobFetchMessageResponse>)fetchWithMessageId:(NSString *)aMessageId error:(NSError **)anErrorParameters
aMessageId |
Identifier of the message to fetch. |
|---|---|
anError |
If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in |
Return Value
The incoming message response if any.
Availability
3.0
Discussion
Warning: This method blocks the calling thread potentially for a very long time (like tens of seconds or even more, depending on the quality of the mobile network connection).
Declared In
EMOobMessageManager.h
– fetchWithMessageId:requestParameter:error:
required method
Fetches a message from the server. This method retrieves a message with a specific identifier.
- (id<EMOobFetchMessageResponse>)fetchWithMessageId:(NSString *)aMessageId requestParameter:(EMOobRequestParameter *)aParam error:(NSError **)anErrorParameters
aMessageId |
Identifier of the message to fetch. |
|---|---|
aParam |
The request parameter object carrying the additional parameters, i.e. custom HTTP headers. |
anError |
If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in |
Return Value
The incoming message response if any.
Availability
4.7
Discussion
Warning: This method blocks the calling thread potentially for a very long time (like tens of seconds or even more, depending on the quality of the mobile network connection).
Declared In
EMOobMessageManager.h
– fetchWithMessageId:completionHandler:
required method
Fetches a message from the server. This method retrieves a message with a specific identifier.
- (void)fetchWithMessageId:(NSString *)aMessageId completionHandler:(void ( ^ ) ( id<EMOobFetchMessageResponse> aResponse , NSError *anError ))aCompletionHandlerParameters
aMessageId |
Identifier of the message to fetch. |
|---|---|
aCompletionHandler |
The block to invoke on the main thread upon completion which contains the response and error information if any. |
Availability
3.0
Discussion
Warning: This method is executed asynchronously
Declared In
EMOobMessageManager.h
– fetchWithMessageId:requestParameter:completionHandler:
required method
Fetches a message from the server. This method retrieves a message with a specific identifier.
- (void)fetchWithMessageId:(NSString *)aMessageId requestParameter:(EMOobRequestParameter *)aParam completionHandler:(void ( ^ ) ( id<EMOobFetchMessageResponse> aResponse , NSError *anError ))aCompletionHandlerParameters
aMessageId |
Identifier of the message to fetch. |
|---|---|
aParam |
The request parameter object carrying the additional parameters, i.e. custom HTTP headers. |
aCompletionHandler |
The block to invoke on the main thread upon completion which contains the response and error information if any. |
Availability
4.7
Discussion
Warning: This method is executed asynchronously
Declared In
EMOobMessageManager.h
Send Messages
– sendWithMessage:error:
required method
Sends a message to the server
- (id<EMOobMessageResponse>)sendWithMessage:(id<EMOobOutgoingMessage>)aMessage error:(NSError **)anErrorParameters
aMessage |
The object that will be use to post the result to the UI thread. |
|---|---|
anError |
If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in |
Return Value
Result of the request.
Availability
3.0
Discussion
Warning: This method blocks the calling thread potentially for a very long time (like tens of seconds or even more, depending on the quality of the mobile network connection).
Declared In
EMOobMessageManager.h
– sendWithMessage:requestParameter:error:
required method
Sends a message to the server
- (id<EMOobMessageResponse>)sendWithMessage:(id<EMOobOutgoingMessage>)aMessage requestParameter:(EMOobRequestParameter *)aParam error:(NSError **)anErrorParameters
aMessage |
The object that will be use to post the result to the UI thread. |
|---|---|
aParam |
The request parameter object carrying the additional parameters, i.e. custom HTTP headers. |
anError |
If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in |
Return Value
Result of the request.
Availability
4.7
Discussion
Warning: This method blocks the calling thread potentially for a very long time (like tens of seconds or even more, depending on the quality of the mobile network connection).
Declared In
EMOobMessageManager.h
– sendWithMessage:completionHandler:
required method
Sends a message to the server.
- (void)sendWithMessage:(id<EMOobOutgoingMessage>)aMessage completionHandler:(void ( ^ ) ( id<EMOobMessageResponse> aResponse , NSError *anError ))aCompletionHandlerParameters
aMessage |
The message to send. |
|---|---|
aCompletionHandler |
The block to invoke on the main thread upon completion which contains the response and error information if any. |
Availability
3.0
Discussion
Warning: This method is executed asynchronously
Declared In
EMOobMessageManager.h
– sendWithMessage:requestParameter:completionHandler:
required method
Sends a message to the server.
- (void)sendWithMessage:(id<EMOobOutgoingMessage>)aMessage requestParameter:(EMOobRequestParameter *)aParam completionHandler:(void ( ^ ) ( id<EMOobMessageResponse> aResponse , NSError *anError ))aCompletionHandlerParameters
aMessage |
The message to send. |
|---|---|
aParam |
The request parameter object carrying the additional parameters, i.e. custom HTTP headers. |
aCompletionHandler |
The block to invoke on the main thread upon completion which contains the response and error information if any. |
Availability
4.7
Discussion
Warning: This method is executed asynchronously
Declared In
EMOobMessageManager.h
Send Acknowledgment
– acknowledgeWithMessage:error:
required method
Sends a message acknowledgment to the server
- (id<EMOobResponse>)acknowledgeWithMessage:(id<EMOobIncomingMessage>)aMessage error:(NSError **)anErrorParameters
aMessage |
The incoming message to acknowledge. |
|---|---|
anError |
If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in |
Return Value
Result of the request.
Availability
3.0
Discussion
Warning: This method blocks the calling thread potentially for a very long time (like tens of seconds or even more, depending on the quality of the mobile network connection).
Declared In
EMOobMessageManager.h
– acknowledgeWithMessage:requestParameter:error:
required method
Sends a message acknowledgment to the server
- (id<EMOobResponse>)acknowledgeWithMessage:(id<EMOobIncomingMessage>)aMessage requestParameter:(EMOobRequestParameter *)aParam error:(NSError **)anErrorParameters
aMessage |
The incoming message to acknowledge. |
|---|---|
aParam |
The request parameter object carrying the additional parameters, i.e. custom HTTP headers. |
anError |
If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in |
Return Value
Result of the request.
Availability
4.7
Discussion
Warning: This method blocks the calling thread potentially for a very long time (like tens of seconds or even more, depending on the quality of the mobile network connection).
Declared In
EMOobMessageManager.h
– acknowledgeWithMessage:completionHandler:
required method
Sends a message acknowledgment to the server.
- (void)acknowledgeWithMessage:(id<EMOobIncomingMessage>)aMessage completionHandler:(void ( ^ ) ( id<EMOobResponse> aResponse , NSError *anError ))aCompletionHandlerParameters
aMessage |
The incoming message to acknowledge. |
|---|---|
aCompletionHandler |
The block to invoke on the main thread upon completion which contains the response and error information if any. |
Availability
3.0
Discussion
Warning: This method is executed asynchronously
Declared In
EMOobMessageManager.h
– acknowledgeWithMessage:requestParameter:completionHandler:
required method
Sends a message acknowledgment to the server.
- (void)acknowledgeWithMessage:(id<EMOobIncomingMessage>)aMessage requestParameter:(EMOobRequestParameter *)aParam completionHandler:(void ( ^ ) ( id<EMOobResponse> aResponse , NSError *anError ))aCompletionHandlerParameters
aMessage |
The incoming message to acknowledge. |
|---|---|
aParam |
The request parameter object carrying the additional parameters, i.e. custom HTTP headers. |
aCompletionHandler |
The block to invoke on the main thread upon completion which contains the response and error information if any. |
Availability
4.7
Discussion
Warning: This method is executed asynchronously
Declared In
EMOobMessageManager.h