Package com.adaptris.interlok.nats
Class Helper
- java.lang.Object
-
- com.adaptris.interlok.nats.Helper
-
public abstract class Helper extends java.lang.Object
Helper for testability.
-
-
Constructor Summary
Constructors Constructor Description Helper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AdaptrisMessage
build(io.nats.client.Message nats, AdaptrisMessageFactory mf)
Create anAdaptrisMessage
from the incomingMessage
.static void
closeDispatcher(io.nats.client.Connection c, io.nats.client.Dispatcher d)
static void
closeDispatchers(io.nats.client.Connection conn, java.util.Collection<io.nats.client.Dispatcher> dispatchers)
static void
closeQuietly(java.lang.AutoCloseable c)
-
-
-
Method Detail
-
build
public static AdaptrisMessage build(io.nats.client.Message nats, AdaptrisMessageFactory mf)
Create anAdaptrisMessage
from the incomingMessage
.if the corresponding
Message#getSID()
,Message#getSubject()
,Message#getReplyTo()
are not blank then they will be added against their respective metadata keys (defined inNatsConstants
).- Parameters:
nats
- the message from the nats servermf
- the message factory (default factory is used if null)- Returns:
- the new AdaptrisMessage.
-
closeQuietly
public static void closeQuietly(java.lang.AutoCloseable c)
-
closeDispatchers
public static void closeDispatchers(io.nats.client.Connection conn, java.util.Collection<io.nats.client.Dispatcher> dispatchers)
-
closeDispatcher
public static void closeDispatcher(io.nats.client.Connection c, io.nats.client.Dispatcher d)
-
-