DataSource.NET  7.1.24.51146-15262a0d
Caplin.DataSource.Messaging.ICachedMessageFactory Interface Reference

Inherited by Caplin.DataSource.Messaging.IInternalMessageFactory.

Public Member Functions

IJsonMessage CreateJsonMessage (String subject, Object json)
 
ISubjectErrorEvent CreateSubjectErrorEvent (String subject, SubjectError error, params SubjectErrorFlags[] flags)
 
ISubjectStatusEvent CreateSubjectStatusEvent (String subject, SubjectStatus status, String message)
 

Detailed Description

A message factory is used to create cached DataSource messages that can be published to other DataSources.

You do not have to implement this interface yourself. An implementation is provided, and can be retrieved from any CachingPublisher by calling the CachingPublisher::getCachedMessageFactory method.

Member Function Documentation

IJsonMessage Caplin.DataSource.Messaging.ICachedMessageFactory.CreateJsonMessage ( String  subject,
Object  json 
)

Creates a JSON message for the given subject.

Parameters
subjectThe subject of the message.
jsonAn object to be serialized using the installed JsonHandler.
Returns
A new JSON message.
ISubjectErrorEvent Caplin.DataSource.Messaging.ICachedMessageFactory.CreateSubjectErrorEvent ( String  subject,
SubjectError  error,
params SubjectErrorFlags[]  flags 
)

Creates a subject error event.

Parameters
subjectThe subject to which the error relates.
errorThe error.
flagsAdditional flags to be set on the nodata
Returns
A subject error event.
ISubjectStatusEvent Caplin.DataSource.Messaging.ICachedMessageFactory.CreateSubjectStatusEvent ( String  subject,
SubjectStatus  status,
String  message 
)

Creates a subject status event.

Parameters
subjectThe subject to which the status relates.
statusThe status.
messageA free form textual message indicating the reason for the status message being raised.
Returns
A subject status event.

Generated on Fri May 6 2022 16:53:20 for DataSource.NET