Class TopicMessage
TopicMessage
This allows the instantiation of full messages on the client, to be populated via the exposed API and then sent to the server.
Constructor Summary
null
|
TopicMessage
|
Method Summary
null
|
addUserHeader(header)
Add a user header to the current headers |
Array
|
asFields()
Returns an array of all fields contained within message |
Array
|
asRecords()
Returns the records held in the message |
String
|
asString()
Returns the message body with correct delimiters |
String
|
displayFormat()
Returns the message body, formatted to display tags instead of character entities as delimiters |
String
|
getAckID()
Get the ack ID set for this message |
Boolean
|
getAckRequired()
Check if this message requires an Ack |
int
|
getAckTimeout()
Get the ack timeout for this message |
Boolean
|
getCrytped()
Check if this message is set to be encrypted |
String
|
getMessage()
Return the string representation of the message body Alias for asString method |
String
|
getTopic()
Returns the topic assigned to this TopicMessage |
Array
|
getUserHeaders()
Get the current user headers |
Boolean
|
isEncrypted()
Check if this message is set to be encrypted |
null
|
parseMessage(message)
Convert message string into records and fields |
null
|
put(message)
Set message value from string |
null
|
putFields(fields)
Insert one or more fields into the current record. |
null
|
putRecord(fields)
Insert one or more fields into a new record. |
null
|
putRecords(records)
Put one or more Records into the message |
String
|
setAckRequired(Set)
Set this message to require an Ack |
null
|
setAckTimeout(set)
Set the timeout to be used if this message requires an Ack |
null
|
setCrypted(value)
Set whether this message is sent as encrypted data |
null
|
setEncrypted(a)
Set whether this message is sent as encrypted data |
null
|
setMessage(message)
Set message value from string Alias for put method |
null
|
setUserHeaders(headers)
Set headers by array |
Constructor Details
TopicMessage
TopicMessage
- Parameters
-
topic
- -
message
-
Method Details
addUserHeader
addUserHeader(header)
Add a user header to the current headers
- Parameters
-
header
-
asFields
Array asFields()
Returns an array of all fields contained within message
asRecords
Array asRecords()
Returns the records held in the message
asString
String asString()
Returns the message body with correct delimiters
displayFormat
String displayFormat()
Returns the message body, formatted to display tags instead of character entities as delimiters
getAckID
String getAckID()
Get the ack ID set for this message
getAckRequired
Boolean getAckRequired()
Check if this message requires an Ack
getAckTimeout
int getAckTimeout()
Get the ack timeout for this message
getCrytped
Boolean getCrytped()
Check if this message is set to be encrypted
- Deprecated:
- Use isEncrypted()
getMessage
String getMessage()
Return the string representation of the message body Alias for asString method
- Deprecated:
- Use TopicMessage.asString instead
getTopic
String getTopic()
Returns the topic assigned to this TopicMessage
getUserHeaders
Array getUserHeaders()
Get the current user headers
isEncrypted
Boolean isEncrypted()
Check if this message is set to be encrypted
parseMessage
parseMessage(message)
Convert message string into records and fields
- Parameters
-
message
-
put
put(message)
Set message value from string
- Parameters
-
message
-
putFields
putFields(fields)
Insert one or more fields into the current record.
- Parameters
-
fields
- Either an array, or multiple strings
putRecord
putRecord(fields)
Insert one or more fields into a new record.
- Parameters
-
fields
- Either an array, or multiple strings
putRecords
putRecords(records)
Put one or more Records into the message
- Parameters
-
records
- Either an array, or multiple DiffusionRecords
setAckRequired
String setAckRequired(Set)
Set this message to require an Ack
- Parameters
-
Set
- the timeout (ms) for the server to respond
setAckTimeout
setAckTimeout(set)
Set the timeout to be used if this message requires an Ack
- Parameters
-
set
- the ack timeout (ms)
setCrypted
setCrypted(value)
Set whether this message is sent as encrypted data
- Parameters
-
value
-
- Deprecated:
- Use setEncrypted()
setEncrypted
setEncrypted(a)
Set whether this message is sent as encrypted data
- Parameters
-
a
- boolean value indicates if the message should be encrypted before being sent
setMessage
setMessage(message)
Set message value from string Alias for put method
- Parameters
-
message
-
- Deprecated:
- Use TopicMessage.put instead
setUserHeaders
setUserHeaders(headers)
Set headers by array
- Parameters
-
headers
-