Interface LocalizedQueueConnectionFactory.NodeLocator<T>
-
- Type Parameters:
T- the client type.
- All Known Implementing Classes:
RestTemplateNodeLocator,WebFluxNodeLocator
- Enclosing class:
- LocalizedQueueConnectionFactory
public static interface LocalizedQueueConnectionFactory.NodeLocator<T>Used to obtain a connection factory for the queue leader.- Since:
- 2.4.8
-
-
Field Summary
Fields Modifier and Type Field Description static LogAccessorLOGGER
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose(T client)Close the client.TcreateClient(java.lang.String userName, java.lang.String password)Create a client for subsequent use.default ConnectionFactorylocate(java.lang.String[] adminUris, java.util.Map<java.lang.String,java.lang.String> nodeToAddress, java.lang.String vhost, java.lang.String username, java.lang.String password, java.lang.String queue, LocalizedQueueConnectionFactory.FactoryFinder factoryFunction)Return a connection factory for the leader node for the queue.java.util.Map<java.lang.String,java.lang.Object>restCall(T client, java.lang.String baseUri, java.lang.String vhost, java.lang.String queue)Retrieve a map of queue properties using the RabbitMQ Management REST API.
-
-
-
Field Detail
-
LOGGER
static final LogAccessor LOGGER
-
-
Method Detail
-
locate
@Nullable default ConnectionFactory locate(java.lang.String[] adminUris, java.util.Map<java.lang.String,java.lang.String> nodeToAddress, java.lang.String vhost, java.lang.String username, java.lang.String password, java.lang.String queue, LocalizedQueueConnectionFactory.FactoryFinder factoryFunction)
Return a connection factory for the leader node for the queue.- Parameters:
adminUris- an array of admin URIs.nodeToAddress- a map of node names to node addresses (AMQP).vhost- the vhost.username- the user name.password- the password.queue- the queue name.factoryFunction- an internal function to find or create the factory.- Returns:
- a connection factory, if the leader node was found; null otherwise.
-
createClient
T createClient(java.lang.String userName, java.lang.String password)
Create a client for subsequent use.- Parameters:
userName- the user name.password- the password.- Returns:
- the client.
-
close
default void close(T client)
Close the client.- Parameters:
client- the client.
-
restCall
@Nullable java.util.Map<java.lang.String,java.lang.Object> restCall(T client, java.lang.String baseUri, java.lang.String vhost, java.lang.String queue) throws java.net.URISyntaxException
Retrieve a map of queue properties using the RabbitMQ Management REST API.- Parameters:
client- the client.baseUri- the base uri.vhost- the virtual host.queue- the queue name.- Returns:
- the map of queue properties.
- Throws:
java.net.URISyntaxException- if the syntax is bad.
-
-