|
DataSource.NET
8.0.13.562038-b0f3b66e
|
![]() |
A message factory is used to create DataSource messages that can be published to other DataSources. More...
Inherited by Caplin.DataSource.Messaging.IInternalCachedMessageFactory.
Public Member Functions | |
| IBinaryMessage | CreateBinaryMessage (string subject, byte[] binaryData) |
| Creates a Binary message to which Binary structured data can be added. More... | |
| IContainerMessage | CreateContainerMessage (string subject) |
| Create a message that defines a container. The name of the container is the given subject. More... | |
| IGenericMessage | CreateGenericMessage (string subject) |
| Creates a Generic message to which Generic structured data can be added. More... | |
| IJsonMessage | CreateJsonMessage (String subject, Object json) |
| IRecordType1Message | CreateRecordType1Message (string subject) |
| Creates a Record message to which Type 1 structured data can be added. More... | |
| ISubjectErrorEvent | CreateSubjectErrorEvent (string subject, SubjectError error, params SubjectErrorFlags[] flags) |
| Creates a subject error event. More... | |
| ISubjectStatusEvent | CreateSubjectStatusEvent (string subject, SubjectStatus status, string message) |
| Creates a subject status event. More... | |
A message factory is used to create DataSource messages that can be published to other DataSources.
| IBinaryMessage Caplin.DataSource.Messaging.ICachedMessageFactory.CreateBinaryMessage | ( | string | subject, |
| byte[] | binaryData | ||
| ) |
Creates a Binary message to which Binary structured data can be added.
| subject | The subject of the Message. |
| binaryData | The binaryData for the Message. |
The returned message contains no data. To populate the message with data, use the appropriate methods of Caplin.DataSource.Messaging.Binary.IBinaryMessage.
| IContainerMessage Caplin.DataSource.Messaging.ICachedMessageFactory.CreateContainerMessage | ( | string | subject | ) |
Create a message that defines a container. The name of the container is the given subject.
| subject | The subject defining the name of the container. |
| IGenericMessage Caplin.DataSource.Messaging.ICachedMessageFactory.CreateGenericMessage | ( | string | subject | ) |
Creates a Generic message to which Generic structured data can be added.
| subject | The subject of the Message. |
Generic messages can be used without specifying field mappings in a separate adapter configuration file. This may be useful when receiving updates from a provider which supplies a variable or unknown number of fields.
The returned message contains no data. To populate the message with data, use the appropriate methods of Caplin.DataSource.Messaging.Record.IGenericMessage.
| IJsonMessage Caplin.DataSource.Messaging.ICachedMessageFactory.CreateJsonMessage | ( | String | subject, |
| Object | json | ||
| ) |
| IRecordType1Message Caplin.DataSource.Messaging.ICachedMessageFactory.CreateRecordType1Message | ( | string | subject | ) |
Creates a Record message to which Type 1 structured data can be added.
| subject | The subject of the Record. |
The returned message contains no data. To populate the message with data, use the appropriate methods of Caplin.DataSource.Messaging.Record.IRecordType1Message.
| ISubjectErrorEvent Caplin.DataSource.Messaging.ICachedMessageFactory.CreateSubjectErrorEvent | ( | string | subject, |
| SubjectError | error, | ||
| params SubjectErrorFlags[] | flags | ||
| ) |
Creates a subject error event.
| subject | The subject to which the error relates. |
| error | The error. |
| flags | Additional Flags to be applied to the SubjectError message. |
The following example shows how to create an ISubjectErrorEvent for a specified subject, and send it to all peers that have requested that subject:
| ISubjectStatusEvent Caplin.DataSource.Messaging.ICachedMessageFactory.CreateSubjectStatusEvent | ( | string | subject, |
| SubjectStatus | status, | ||
| string | message | ||
| ) |
Creates a subject status event.
| subject | The subject to which the status relates. |
| status | The status. |
| message | A free form textual message indicating the reason for the status message being raised. |
The following example shows how to create an ISubjectStatusEvent for a specified subject, and send it to all peers that have requested that subject.