Class ConnectionHolder
- java.lang.Object
-
- io.smallrye.reactive.messaging.amqp.ConnectionHolder
-
public class ConnectionHolder extends Object
-
-
Constructor Summary
Constructors Constructor Description ConnectionHolder(io.vertx.mutiny.amqp.AmqpClient client, AmqpConnectorCommonConfiguration configuration, io.vertx.mutiny.core.Vertx vertx)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<String>
capabilities(io.vertx.mutiny.amqp.AmqpConnection connection)
Retrieves the underlying connection capabilities.io.vertx.mutiny.core.Context
getContext()
int
getHealthTimeout()
io.smallrye.mutiny.Uni<io.vertx.mutiny.amqp.AmqpConnection>
getOrEstablishConnection()
io.vertx.mutiny.core.Vertx
getVertx()
io.smallrye.mutiny.Uni<Boolean>
isConnected()
void
onFailure(Consumer<Throwable> callback)
static CompletionStage<Void>
runOnContext(io.vertx.mutiny.core.Context context, Runnable runnable)
static CompletionStage<Void>
runOnContextAndReportFailure(io.vertx.mutiny.core.Context context, Throwable reason, Runnable runnable)
static boolean
supportAnonymousRelay(io.vertx.mutiny.amqp.AmqpConnection connection)
Checks whether the given connection support anonymous relay (and so can create an anonymous sender).
-
-
-
Constructor Detail
-
ConnectionHolder
public ConnectionHolder(io.vertx.mutiny.amqp.AmqpClient client, AmqpConnectorCommonConfiguration configuration, io.vertx.mutiny.core.Vertx vertx)
-
-
Method Detail
-
getContext
public io.vertx.mutiny.core.Context getContext()
-
isConnected
@CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> isConnected()
-
capabilities
public static List<String> capabilities(io.vertx.mutiny.amqp.AmqpConnection connection)
Retrieves the underlying connection capabilities. Must be called from the appropriate context.- Returns:
- the list of capability
-
supportAnonymousRelay
public static boolean supportAnonymousRelay(io.vertx.mutiny.amqp.AmqpConnection connection)
Checks whether the given connection support anonymous relay (and so can create an anonymous sender). Must be called from the appropriate context.- Parameters:
connection
- the connection- Returns:
- true if the connection offers the anynymous relay capability
-
getVertx
public io.vertx.mutiny.core.Vertx getVertx()
-
getHealthTimeout
public int getHealthTimeout()
-
getOrEstablishConnection
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.mutiny.amqp.AmqpConnection> getOrEstablishConnection()
-
runOnContext
public static CompletionStage<Void> runOnContext(io.vertx.mutiny.core.Context context, Runnable runnable)
-
runOnContextAndReportFailure
public static CompletionStage<Void> runOnContextAndReportFailure(io.vertx.mutiny.core.Context context, Throwable reason, Runnable runnable)
-
-