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
public class SingleValuePublisher<T,S extends SubjectInfo> extends SubjectMessagePublisher<S>
Publishes single value messages of a given type.
-
-
Constructor Summary
Constructors Constructor Description SingleValuePublisher(CachedPublisher publisher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
publish(S subjectInfo, T value)
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, ratesUnavailable, sendErrorEvent, sendMapping, sendMapping, sendNotFound, sendNotStale, sendStale, sendStale, sendSubjectStatusEvent, sendSubscribeFail, sendSubscribeFail
-
-
-
-
Constructor Detail
-
SingleValuePublisher
public SingleValuePublisher(CachedPublisher publisher)
-
-
Method Detail
-
publish
public void publish(S subjectInfo, T value)
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
public void publishError(S subjectInfo, com.caplin.datasource.SubjectError subjectError)
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
public void publishStatus(S subjectInfo, com.caplin.datasource.SubjectStatus subjectStatus)
Publish the specified SubjectStatus to clients subscribed to the specified subject.- Parameters:
subjectInfo
- the subject to publish the value onsubjectStatus
- the SubjectStatus to publish
-
-