Class SingleValuePublisher<T,S extends SubjectInfo>
java.lang.Object
com.caplin.motif.datasource.SubjectMessagePublisher<S>
com.caplin.motif.datasource.publisher.SingleValuePublisher<T,S>
- Type Parameters:
T
- the type of value to publishS
- the type of SubjectInfo to publish with
Publishes single value messages of a given type.
-
Constructor Summary
ConstructorDescriptionSingleValuePublisher
(com.caplin.datasource.publisher.CachingPublisher publisher) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Publish the specified value to clients subscribed to the specified subject.void
publishError
(S subjectInfo, com.caplin.datasource.SubjectError subjectError) Publish the specified error to clients subscribed to the specified subject.void
publishStatus
(S subjectInfo, com.caplin.datasource.SubjectStatus subjectStatus) Publish the specified SubjectStatus to clients subscribed to the specified subject.Methods inherited from class com.caplin.motif.datasource.SubjectMessagePublisher
publishMessage, publishMessage, sendErrorEvent, sendMapping, sendMapping, sendNotFound, sendNotStale, sendStale, sendStale, sendSubjectStatusEvent, sendSubscribeFail, sendSubscribeFail
-
Constructor Details
-
SingleValuePublisher
public SingleValuePublisher(com.caplin.datasource.publisher.CachingPublisher publisher)
-
-
Method Details
-
publish
Publish the specified value to clients subscribed to the specified subject.- Parameters:
subjectInfo
- the subject to publish the value onvalue
- the value to publish
-
publishError
Publish the specified error to clients subscribed to the specified subject.- Parameters:
subjectInfo
- the subject to publish the value onsubjectError
- the SubjectError to publish
-
publishStatus
Publish the specified SubjectStatus to clients subscribed to the specified subject.- Parameters:
subjectInfo
- the subject to publish the value onsubjectStatus
- the SubjectStatus to publish
-