Share via


AmqpConnection Interface

Implements

public interface AmqpConnection
extends Disposable, AsyncCloseable

Represents a TCP connection between the client and a service that uses the AMQP protocol.

Method Summary

Modifier and Type Method and Description
default Mono<Void> closeAsync()

Disposes of the AMQP connection.

abstract Mono<AmqpSession> createSession(String sessionName)

Creates a new session with the given session name.

abstract Mono<ClaimsBasedSecurityNode> getClaimsBasedSecurityNode()

Gets the claims-based security (CBS) node that authorizes access to resources.

abstract Map<String,Object> getConnectionProperties()

Gets the connection properties.

abstract Flux<AmqpEndpointState> getEndpointStates()

Gets the endpoint states for the AMQP connection.

abstract String getFullyQualifiedNamespace()

Gets the fully qualified namespace for the AMQP connection.

abstract String getId()

Gets the connection identifier.

default Mono<AmqpManagementNode> getManagementNode(String entityPath)

Gets or creates the management node.

abstract int getMaxFrameSize()

Gets the maximum frame size for the connection.

abstract Flux<AmqpShutdownSignal> getShutdownSignals()

Gets any shutdown signals that occur in the AMQP endpoint.

abstract boolean removeSession(String sessionName)

Removes a session with the sessionName from the AMQP connection.

Method Details

closeAsync

public default Mono<Void> closeAsync()

Disposes of the AMQP connection.

Returns:

Mono that completes when the close operation is complete.

createSession

public abstract Mono<AmqpSession> createSession(String sessionName)

Creates a new session with the given session name.

Parameters:

sessionName - Name of the session.

Returns:

The AMQP session that was created.

getClaimsBasedSecurityNode

public abstract Mono<ClaimsBasedSecurityNode> getClaimsBasedSecurityNode()

Gets the claims-based security (CBS) node that authorizes access to resources.

Returns:

Provider that authorizes access to AMQP resources.

getConnectionProperties

public abstract Map<String,Object> getConnectionProperties()

Gets the connection properties.

Returns:

Properties associated with this connection.

getEndpointStates

public abstract Flux<AmqpEndpointState> getEndpointStates()

Gets the endpoint states for the AMQP connection. AmqpException that occur on the link are reported in the connection state. When the stream terminates, the connection is closed.

Returns:

A stream of endpoint states for the AMQP connection.

getFullyQualifiedNamespace

public abstract String getFullyQualifiedNamespace()

Gets the fully qualified namespace for the AMQP connection.

Returns:

The hostname for the AMQP connection.

getId

public abstract String getId()

Gets the connection identifier.

Returns:

The connection identifier.

getManagementNode

public default Mono<AmqpManagementNode> getManagementNode(String entityPath)

Gets or creates the management node.

Parameters:

entityPath - Entity for which to get the management node of.

Returns:

A Mono that completes with the management node.

getMaxFrameSize

public abstract int getMaxFrameSize()

Gets the maximum frame size for the connection.

Returns:

The maximum frame size for the connection.

getShutdownSignals

public abstract Flux<AmqpShutdownSignal> getShutdownSignals()

Gets any shutdown signals that occur in the AMQP endpoint.

Returns:

A stream of shutdown signals that occur in the AMQP endpoint.

removeSession

public abstract boolean removeSession(String sessionName)

Removes a session with the sessionName from the AMQP connection.

Parameters:

sessionName - Name of the session to remove.

Returns:

true if a session with the name was removed; false otherwise.

Applies to