Class ObjectPublisher<S>

  • Type Parameters:
    S - the type of object this publisher publishes

    public class ObjectPublisher<S>
    extends java.lang.Object
    Publishes objects by serialising before sending on the wire.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void publish​(java.lang.String subject, S object)
      Publish the specified object to clients subscribed to the specified subject.
      void publishError​(SubjectInfo subjectInfo, com.caplin.datasource.SubjectError subjectError)
      Publish the specified error to clients subscribed to the specified subject.
      void publishStatus​(SubjectInfo subjectInfo, com.caplin.datasource.SubjectStatus subjectStatus)
      Publish the specified SubjectStatus to clients subscribed to the specified subject.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ObjectPublisher

        public ObjectPublisher​(@NotNull
                               @NotNull SubjectMessagePublisher<SubjectInfo> publisher,
                               com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • Method Detail

      • publish

        public void publish​(java.lang.String subject,
                            S object)
        Publish the specified object to clients subscribed to the specified subject.
        Parameters:
        subject - the subject to publish the object on
        object - the object to publish
      • publishError

        public void publishError​(SubjectInfo subjectInfo,
                                 com.caplin.datasource.SubjectError subjectError)
        Publish the specified error to clients subscribed to the specified subject.
        Parameters:
        subjectInfo -
        subjectError -
      • publishStatus

        public void publishStatus​(SubjectInfo subjectInfo,
                                  com.caplin.datasource.SubjectStatus subjectStatus)
        Publish the specified SubjectStatus to clients subscribed to the specified subject.
        Parameters:
        subjectInfo -
        subjectStatus -