public class Client
extends java.lang.Object
| Constructor and Description |
|---|
Client(java.lang.String url)
Construct an instance with the provided url and credentials.
|
Client(java.lang.String url,
java.lang.String username,
java.lang.String password)
Construct an instance with the provided url and credentials.
|
Client(java.lang.String url,
java.lang.String username,
java.lang.String password,
HttpClientBuilderConfigurator configurator)
Construct an instance with the provided url and credentials.
|
Client(java.net.URL url)
Construct an instance with the provided url and credentials.
|
Client(java.net.URL url,
java.lang.String username,
java.lang.String password)
Construct an instance with the provided url and credentials.
|
Client(java.net.URL url,
java.lang.String username,
java.lang.String password,
HttpClientBuilderConfigurator configurator)
Construct an instance with the provided url and credentials.
|
Client(java.net.URL url,
java.lang.String username,
java.lang.String password,
javax.net.ssl.SSLContext sslContext)
Construct an instance with the provided url and credentials.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
alivenessTest(java.lang.String vhost)
Performs a basic node aliveness check: declares a queue, publishes a message
that routes to it, consumes it, cleans up.
|
void |
bindExchange(java.lang.String vhost,
java.lang.String destination,
java.lang.String source,
java.lang.String routingKey) |
void |
bindExchange(java.lang.String vhost,
java.lang.String destination,
java.lang.String source,
java.lang.String routingKey,
java.util.Map<java.lang.String,java.lang.Object> args) |
void |
bindQueue(java.lang.String vhost,
java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey) |
void |
bindQueue(java.lang.String vhost,
java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey,
java.util.Map<java.lang.String,java.lang.Object> args) |
void |
clearPermissions(java.lang.String vhost,
java.lang.String username) |
void |
closeConnection(java.lang.String name)
Forcefully closes individual connection.
|
void |
closeConnection(java.lang.String name,
java.lang.String reason)
Forcefully closes individual connection with a user-provided message.
|
void |
createUser(java.lang.String username,
char[] password,
java.util.List<java.lang.String> tags) |
void |
createUserWithPasswordHash(java.lang.String username,
char[] passwordHash,
java.util.List<java.lang.String> tags) |
void |
createVhost(java.lang.String name) |
void |
declareExchange(java.lang.String vhost,
java.lang.String name,
ExchangeInfo info) |
void |
declarePolicy(java.lang.String vhost,
java.lang.String name,
PolicyInfo info) |
void |
declareQueue(java.lang.String vhost,
java.lang.String name,
QueueInfo info) |
void |
declareShovel(java.lang.String vhost,
ShovelInfo info)
Declares a shovel.
|
void |
deleteExchange(java.lang.String vhost,
java.lang.String name) |
void |
deletePolicy(java.lang.String vhost,
java.lang.String name) |
void |
deleteQueue(java.lang.String vhost,
java.lang.String name) |
void |
deleteShovel(java.lang.String vhost,
java.lang.String shovelname)
Deletes the specified shovel from specified virtual host.
|
void |
deleteUser(java.lang.String username) |
void |
deleteVhost(java.lang.String name) |
java.util.List<BindingInfo> |
getBindings() |
java.util.List<BindingInfo> |
getBindings(java.lang.String vhost) |
java.util.List<BindingInfo> |
getBindingsBySource(java.lang.String vhost,
java.lang.String exchange)
Returns a list of bindings where provided exchange is the source (other things are
bound to it).
|
ChannelInfo |
getChannel(java.lang.String name)
Retrieves state and metrics information for individual channel.
|
java.util.List<ChannelInfo> |
getChannels()
Retrieves state and metrics information for all channels across the cluster.
|
java.util.List<ChannelInfo> |
getChannels(java.lang.String connectionName)
Retrieves state and metrics information for all channels on individual connection.
|
ClusterId |
getClusterName() |
ConnectionInfo |
getConnection(java.lang.String name)
Retrieves state and metrics information for individual client connection.
|
java.util.List<ConnectionInfo> |
getConnections()
Retrieves state and metrics information for all client connections across the cluster.
|
Definitions |
getDefinitions() |
ExchangeInfo |
getExchange(java.lang.String vhost,
java.lang.String name) |
java.util.List<BindingInfo> |
getExchangeBindingsBetween(java.lang.String vhost,
java.lang.String source,
java.lang.String destination) |
java.util.List<BindingInfo> |
getExchangeBindingsByDestination(java.lang.String vhost,
java.lang.String exchange)
Returns a list of bindings where provided exchange is the destination (it is
bound to another exchange).
|
java.util.List<ExchangeInfo> |
getExchanges() |
java.util.List<ExchangeInfo> |
getExchanges(java.lang.String vhost) |
java.util.List<java.util.Map> |
getExtensions() |
NodeInfo |
getNode(java.lang.String name)
Retrieves state and metrics information for individual node.
|
java.util.List<NodeInfo> |
getNodes()
Retrieves state and metrics information for all nodes in the cluster.
|
OverviewResponse |
getOverview() |
java.util.List<UserPermissions> |
getPermissions() |
UserPermissions |
getPermissions(java.lang.String vhost,
java.lang.String username) |
java.util.List<UserPermissions> |
getPermissionsIn(java.lang.String vhost) |
java.util.List<UserPermissions> |
getPermissionsOf(java.lang.String username) |
java.util.List<PolicyInfo> |
getPolicies() |
java.util.List<PolicyInfo> |
getPolicies(java.lang.String vhost) |
QueueInfo |
getQueue(java.lang.String vhost,
java.lang.String name) |
java.util.List<BindingInfo> |
getQueueBindings(java.lang.String vhost,
java.lang.String queue)
Returns a list of bindings where provided queue is the destination.
|
java.util.List<BindingInfo> |
getQueueBindingsBetween(java.lang.String vhost,
java.lang.String exchange,
java.lang.String queue) |
java.util.List<QueueInfo> |
getQueues() |
java.util.List<QueueInfo> |
getQueues(java.lang.String vhost) |
java.util.List<ShovelInfo> |
getShovels()
Returns virtual host shovels.
|
java.util.List<ShovelInfo> |
getShovels(java.lang.String vhost)
Returns virtual host shovels.
|
java.util.List<ShovelStatus> |
getShovelsStatus()
Returns virtual host shovels.
|
java.util.List<ShovelStatus> |
getShovelsStatus(java.lang.String vhost)
Returns virtual host shovels.
|
UserInfo |
getUser(java.lang.String username) |
java.util.List<UserInfo> |
getUsers() |
VhostInfo |
getVhost(java.lang.String name) |
java.util.List<VhostInfo> |
getVhosts() |
void |
purgeQueue(java.lang.String vhost,
java.lang.String name) |
void |
setClusterName(java.lang.String name) |
void |
unbindExchange(java.lang.String vhost,
java.lang.String destination,
java.lang.String source,
java.lang.String routingKey) |
void |
unbindQueue(java.lang.String vhost,
java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey) |
void |
updatePermissions(java.lang.String vhost,
java.lang.String username,
UserPermissions permissions) |
void |
updateUser(java.lang.String username,
char[] password,
java.util.List<java.lang.String> tags) |
CurrentUserDetails |
whoAmI() |
public Client(java.lang.String url,
java.lang.String username,
java.lang.String password)
throws java.net.MalformedURLException,
java.net.URISyntaxException
url - the url e.g. "http://localhost:15672/api/".username - the username.password - the passwordjava.net.MalformedURLException - for a badly formed URL.java.net.URISyntaxException - for a badly formed URL.public Client(java.lang.String url,
java.lang.String username,
java.lang.String password,
HttpClientBuilderConfigurator configurator)
throws java.net.MalformedURLException,
java.net.URISyntaxException
url - the url e.g. "http://localhost:15672/api/".username - the username.password - the passwordconfigurator - HttpClientBuilderConfigurator to usejava.net.MalformedURLException - for a badly formed URL.java.net.URISyntaxException - for a badly formed URL.public Client(java.net.URL url,
java.lang.String username,
java.lang.String password)
throws java.net.MalformedURLException,
java.net.URISyntaxException
url - the url e.g. "http://localhost:15672/api/".username - the username.password - the passwordjava.net.MalformedURLException - for a badly formed URL.java.net.URISyntaxException - for a badly formed URL.public Client(java.net.URL url,
java.lang.String username,
java.lang.String password,
HttpClientBuilderConfigurator configurator)
throws java.net.MalformedURLException,
java.net.URISyntaxException
url - the url e.g. "http://localhost:15672/api/".username - the username.password - the passwordconfigurator - HttpClientBuilderConfigurator to usejava.net.MalformedURLException - for a badly formed URL.java.net.URISyntaxException - for a badly formed URL.public Client(java.net.URL url,
java.lang.String username,
java.lang.String password,
javax.net.ssl.SSLContext sslContext)
throws java.net.MalformedURLException,
java.net.URISyntaxException
url - the url e.g. "http://localhost:15672/api/".username - the username.password - the passwordsslContext - ssl context for http clientjava.net.MalformedURLException - for a badly formed URL.java.net.URISyntaxException - for a badly formed URL.public Client(java.lang.String url)
throws java.net.MalformedURLException,
java.net.URISyntaxException
url - the url e.g. "http://guest:guest@localhost:15672/api/".java.net.MalformedURLException - for a badly formed URL.java.net.URISyntaxException - for a badly formed URL.public Client(java.net.URL url)
throws java.net.MalformedURLException,
java.net.URISyntaxException
url - the url e.g. "http://guest:guest@localhost:15672/api/".java.net.MalformedURLException - for a badly formed URL.java.net.URISyntaxException - for a badly formed URL.public OverviewResponse getOverview()
public boolean alivenessTest(java.lang.String vhost)
vhost - vhost to use to perform aliveness check inpublic CurrentUserDetails whoAmI()
public java.util.List<NodeInfo> getNodes()
public NodeInfo getNode(java.lang.String name)
name - node namepublic java.util.List<ConnectionInfo> getConnections()
public ConnectionInfo getConnection(java.lang.String name)
name - connection namepublic void closeConnection(java.lang.String name)
name - connection namepublic void closeConnection(java.lang.String name,
java.lang.String reason)
name - connection namereason - the reason of closingpublic java.util.List<ChannelInfo> getChannels()
public java.util.List<ChannelInfo> getChannels(java.lang.String connectionName)
connectionName - the connection name to retrieve channelspublic ChannelInfo getChannel(java.lang.String name)
name - channel namepublic java.util.List<VhostInfo> getVhosts()
public VhostInfo getVhost(java.lang.String name)
public void createVhost(java.lang.String name)
throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic void deleteVhost(java.lang.String name)
public java.util.List<UserPermissions> getPermissionsIn(java.lang.String vhost)
public java.util.List<UserPermissions> getPermissionsOf(java.lang.String username)
public java.util.List<UserPermissions> getPermissions()
public UserPermissions getPermissions(java.lang.String vhost, java.lang.String username)
public java.util.List<ExchangeInfo> getExchanges()
public java.util.List<ExchangeInfo> getExchanges(java.lang.String vhost)
public ExchangeInfo getExchange(java.lang.String vhost, java.lang.String name)
public void declareExchange(java.lang.String vhost,
java.lang.String name,
ExchangeInfo info)
public void deleteExchange(java.lang.String vhost,
java.lang.String name)
public java.util.List<QueueInfo> getQueues()
public java.util.List<QueueInfo> getQueues(java.lang.String vhost)
public QueueInfo getQueue(java.lang.String vhost, java.lang.String name)
public void declarePolicy(java.lang.String vhost,
java.lang.String name,
PolicyInfo info)
public void declareQueue(java.lang.String vhost,
java.lang.String name,
QueueInfo info)
public void purgeQueue(java.lang.String vhost,
java.lang.String name)
public void deleteQueue(java.lang.String vhost,
java.lang.String name)
public void deletePolicy(java.lang.String vhost,
java.lang.String name)
public java.util.List<UserInfo> getUsers()
public UserInfo getUser(java.lang.String username)
public void createUser(java.lang.String username,
char[] password,
java.util.List<java.lang.String> tags)
public void createUserWithPasswordHash(java.lang.String username,
char[] passwordHash,
java.util.List<java.lang.String> tags)
public void updateUser(java.lang.String username,
char[] password,
java.util.List<java.lang.String> tags)
public void deleteUser(java.lang.String username)
public void updatePermissions(java.lang.String vhost,
java.lang.String username,
UserPermissions permissions)
public void clearPermissions(java.lang.String vhost,
java.lang.String username)
public java.util.List<PolicyInfo> getPolicies()
public java.util.List<PolicyInfo> getPolicies(java.lang.String vhost)
public java.util.List<BindingInfo> getBindings()
public java.util.List<BindingInfo> getBindings(java.lang.String vhost)
public java.util.List<BindingInfo> getBindingsBySource(java.lang.String vhost, java.lang.String exchange)
vhost - vhost of the exchangeexchange - source exchange namepublic java.util.List<BindingInfo> getExchangeBindingsByDestination(java.lang.String vhost, java.lang.String exchange)
vhost - vhost of the exchangeexchange - destination exchange namepublic java.util.List<BindingInfo> getQueueBindings(java.lang.String vhost, java.lang.String queue)
vhost - vhost of the exchangequeue - destination queue namepublic java.util.List<BindingInfo> getQueueBindingsBetween(java.lang.String vhost, java.lang.String exchange, java.lang.String queue)
public java.util.List<BindingInfo> getExchangeBindingsBetween(java.lang.String vhost, java.lang.String source, java.lang.String destination)
public void bindQueue(java.lang.String vhost,
java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey)
public void bindQueue(java.lang.String vhost,
java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey,
java.util.Map<java.lang.String,java.lang.Object> args)
public void unbindQueue(java.lang.String vhost,
java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey)
public void bindExchange(java.lang.String vhost,
java.lang.String destination,
java.lang.String source,
java.lang.String routingKey)
public void bindExchange(java.lang.String vhost,
java.lang.String destination,
java.lang.String source,
java.lang.String routingKey,
java.util.Map<java.lang.String,java.lang.Object> args)
public void unbindExchange(java.lang.String vhost,
java.lang.String destination,
java.lang.String source,
java.lang.String routingKey)
public ClusterId getClusterName()
public void setClusterName(java.lang.String name)
public java.util.List<java.util.Map> getExtensions()
public Definitions getDefinitions()
public void declareShovel(java.lang.String vhost,
ShovelInfo info)
vhost - virtual host where to declare the shovelinfo - Shovel info.public java.util.List<ShovelInfo> getShovels()
public java.util.List<ShovelInfo> getShovels(java.lang.String vhost)
vhost - Virtual host from where search shovels.public java.util.List<ShovelStatus> getShovelsStatus()
public java.util.List<ShovelStatus> getShovelsStatus(java.lang.String vhost)
vhost - Virtual host from where search shovels.public void deleteShovel(java.lang.String vhost,
java.lang.String shovelname)
vhost - virtual host from where to delete the shovelshovelname - Shovel to be deleted.