Class SingleValuePublisher<T,​S extends SubjectInfo>

  • Type Parameters:
    T - the type of value to publish
    S - 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 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 on
        value - 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 on
        subjectError - 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 on
        subjectStatus - the SubjectStatus to publish