Class StaticPublisherState

java.lang.Object
io.micronaut.nats.intercept.StaticPublisherState

@Internal public class StaticPublisherState extends Object
Stores the static state for publishing messages with NatsClient.
Since:
1.0.0
Author:
jgrimm
  • Constructor Details

    • StaticPublisherState

      protected StaticPublisherState(String subject, io.micronaut.core.type.Argument<?> bodyArgument, io.nats.client.impl.Headers methodHeaders, io.micronaut.core.type.ReturnType<?> returnType, String connection, NatsMessageSerDes<?> serDes, ReactivePublisher reactivePublisher)
      Default constructor.
      Parameters:
      subject - The subject to publish to
      bodyArgument - The argument representing the body
      methodHeaders - The methods headers
      returnType - The return type of the method
      connection - The connection to use
      serDes - The body serializer
      reactivePublisher - The reactive publisher
    • StaticPublisherState

      protected StaticPublisherState(StaticPublisherState other)
  • Method Details

    • getSubject

      public Optional<String> getSubject()
      Returns:
      The subject
    • getBodyArgument

      public io.micronaut.core.type.Argument getBodyArgument()
      Returns:
      The body argument
    • getHeaders

      public io.nats.client.impl.Headers getHeaders()
      Returns:
      the method headers
    • getDataType

      public io.micronaut.core.type.Argument getDataType()
      Returns:
      The type of data being requested
    • getSerDes

      public NatsMessageSerDes<Object> getSerDes()
      Returns:
      The serializer
    • getReactivePublisher

      public ReactivePublisher getReactivePublisher()
      Returns:
      The reactive publisher
    • getConnection

      public String getConnection()
      Returns:
      the connection name