Interface LocalizedQueueConnectionFactory.NodeLocator<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void close​(T client)
      Close the client.
      T createClient​(java.lang.String userName, java.lang.String password)
      Create a client for subsequent use.
      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.
      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.
    • 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.