Package com.adaptris.interlok.nats
Class Helper
java.lang.Object
com.adaptris.interlok.nats.Helper
Helper for testability.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AdaptrisMessagebuild(io.nats.client.Message nats, AdaptrisMessageFactory mf) Create anAdaptrisMessagefrom the incomingMessage.static voidcloseDispatcher(io.nats.client.Connection c, io.nats.client.Dispatcher d) static voidcloseDispatchers(io.nats.client.Connection conn, Collection<io.nats.client.Dispatcher> dispatchers) static void
-
Constructor Details
-
Helper
public Helper()
-
-
Method Details
-
build
Create anAdaptrisMessagefrom 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
-
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)
-