DataSource.NET  7.1.23.41524-1415d4ff
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 Wed Mar 2 2022 14:26:12 for DataSource.NET