Class Helper

java.lang.Object
com.adaptris.interlok.nats.Helper

public abstract class Helper extends Object
Helper for testability.
  • Constructor Details

    • Helper

      public Helper()
  • Method Details

    • build

      public static AdaptrisMessage build(io.nats.client.Message nats, AdaptrisMessageFactory mf)
      Create an AdaptrisMessage from the incoming Message.

      if the corresponding Message#getSID(), Message#getSubject(), Message#getReplyTo() are not blank then they will be added against their respective metadata keys (defined in NatsConstants).

      Parameters:
      nats - the message from the nats server
      mf - the message factory (default factory is used if null)
      Returns:
      the new AdaptrisMessage.
    • closeQuietly

      public static void closeQuietly(AutoCloseable c)
    • closeDispatchers

      public static void closeDispatchers(io.nats.client.Connection conn, Collection<io.nats.client.Dispatcher> dispatchers)
    • closeDispatcher

      public static void closeDispatcher(io.nats.client.Connection c, io.nats.client.Dispatcher d)