Class RestClientNodeLocator

java.lang.Object
org.springframework.amqp.rabbit.connection.RestClientNodeLocator
All Implemented Interfaces:
NodeLocator<RestClient>

public class RestClientNodeLocator extends Object implements NodeLocator<RestClient>
A NodeLocator using the RestClient.
Since:
4.2
Author:
Rene Choi
  • Constructor Details

    • RestClientNodeLocator

      public RestClientNodeLocator()
  • Method Details

    • createClient

      public RestClient createClient(String userName, String password)
      Description copied from interface: NodeLocator
      Create a client for subsequent use.
      Specified by:
      createClient in interface NodeLocator<RestClient>
      Parameters:
      userName - the username.
      password - the password.
      Returns:
      the client.
    • restCall

      public @Nullable Map<String,Object> restCall(RestClient client, String baseUri, String vhost, String queue)
      Description copied from interface: NodeLocator
      Retrieve a map of queue properties using the RabbitMQ Management REST API.
      Specified by:
      restCall in interface NodeLocator<RestClient>
      Parameters:
      client - the client.
      baseUri - the base uri.
      vhost - the virtual host.
      queue - the queue name.
      Returns:
      the map of queue properties.