Class ObjectPublisher<S>

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

    public class ObjectPublisher<S>
    extends Object
    Publishes objects by serialising before sending on the wire.
    • Constructor Detail

      • ObjectPublisher

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

      • publish

        public void publish​(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