Package com.azure.core.amqp
Interface AmqpConnection
-
- All Superinterfaces:
AsyncCloseable,Disposable
public interface AmqpConnection extends Disposable, AsyncCloseable
Represents a TCP connection between the client and a service that uses the AMQP protocol.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface reactor.core.Disposable
Disposable.Composite, Disposable.Swap
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Mono<Void>closeAsync()Disposes of the AMQP connection.Mono<AmqpSession>createSession(String sessionName)Creates a new session with the given session name.Mono<ClaimsBasedSecurityNode>getClaimsBasedSecurityNode()Gets the claims-based security (CBS) node that authorizes access to resources.Map<String,Object>getConnectionProperties()Gets the connection properties.Flux<AmqpEndpointState>getEndpointStates()Gets the endpoint states for the AMQP connection.StringgetFullyQualifiedNamespace()Gets the fully qualified namespace for the AMQP connection.StringgetId()Gets the connection identifier.default Mono<AmqpManagementNode>getManagementNode(String entityPath)Gets or creates the management node.intgetMaxFrameSize()Gets the maximum frame size for the connection.Flux<AmqpShutdownSignal>getShutdownSignals()Gets any shutdown signals that occur in the AMQP endpoint.booleanremoveSession(String sessionName)Removes a session with thesessionNamefrom the AMQP connection.-
Methods inherited from interface reactor.core.Disposable
dispose, isDisposed
-
-
-
-
Method Detail
-
getId
String getId()
Gets the connection identifier.- Returns:
- The connection identifier.
-
getFullyQualifiedNamespace
String getFullyQualifiedNamespace()
Gets the fully qualified namespace for the AMQP connection.- Returns:
- The hostname for the AMQP connection.
-
getMaxFrameSize
int getMaxFrameSize()
Gets the maximum frame size for the connection.- Returns:
- The maximum frame size for the connection.
-
getConnectionProperties
Map<String,Object> getConnectionProperties()
Gets the connection properties.- Returns:
- Properties associated with this connection.
-
getClaimsBasedSecurityNode
Mono<ClaimsBasedSecurityNode> getClaimsBasedSecurityNode()
Gets the claims-based security (CBS) node that authorizes access to resources.- Returns:
- Provider that authorizes access to AMQP resources.
-
createSession
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.
-
removeSession
boolean removeSession(String sessionName)
Removes a session with thesessionNamefrom the AMQP connection.- Parameters:
sessionName- Name of the session to remove.- Returns:
trueif a session with the name was removed;falseotherwise.
-
getEndpointStates
Flux<AmqpEndpointState> getEndpointStates()
Gets the endpoint states for the AMQP connection.AmqpExceptionsthat 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.
-
getShutdownSignals
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.
-
getManagementNode
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.
- Throws:
UnsupportedOperationException- if there is no implementation of fetching a management node.
-
closeAsync
default Mono<Void> closeAsync()
Disposes of the AMQP connection.- Specified by:
closeAsyncin interfaceAsyncCloseable- Returns:
- Mono that completes when the close operation is complete.
-
-