- java.lang.Object
-
- com.rabbitmq.http.client.Client
-
public class Client extends Object
-
-
Constructor Summary
Constructors Constructor Description Client(ClientParameters parameters)
Construct an instance with the providedClientParameters
.Client(String url)
Construct an instance with the provided url and credentials.Client(URL url, String username, String password)
Construct an instance with the provided url and credentials.Client(URL url, String username, String password, SSLContext sslContext)
Construct an instance with the provided url and credentials.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
alivenessTest(String vhost)
Performs a basic node aliveness check: declares a queue, publishes a message that routes to it, consumes it, cleans up.void
bindExchange(String vhost, String destination, String source, String routingKey)
Binds a destination exchange to a source one.void
bindExchange(String vhost, String destination, String source, String routingKey, Map<String,Object> args)
Binds a destination exchange to a source one.void
bindQueue(String vhost, String queue, String exchange, String routingKey)
Binds a queue to an exchange.void
bindQueue(String vhost, String queue, String exchange, String routingKey, Map<String,Object> args)
Binds a queue to an exchange.void
clearMaxConnectionsLimit(String vhost)
Clears the connection limit for a virtual host.void
clearMaxQueuesLimit(String vhost)
Clears the queue limit for a virtual host.void
clearPermissions(String vhost, String username)
void
clearTopicPermissions(String vhost, String username)
void
closeAllConnectionsOfUser(String username)
Forcefully closes all connections that belong to a specific user (used the provided username during authentication).void
closeConnection(String name)
Forcefully closes individual connection.void
closeConnection(String name, String reason)
Forcefully closes individual connection with a user-provided message.void
createUser(String username, char[] password, List<String> tags)
void
createUserWithPasswordHash(String username, char[] passwordHash, List<String> tags)
void
createVhost(String name)
void
createVhost(String name, boolean tracing)
Create a virtual host with name and tracing flag.void
createVhost(String name, boolean tracing, String description, String... tags)
Create a virtual host with name, tracing flag, and metadata.void
createVhost(String name, String description, String... tags)
Create a virtual host with name and metadata.void
declareExchange(String vhost, String name, ExchangeInfo info)
void
declarePolicy(String vhost, String name, PolicyInfo info)
void
declareQueue(String vhost, String name, QueueInfo info)
void
declareShovel(String vhost, ShovelInfo info)
Declares a shovel.void
declareUpstream(String vhost, String name, UpstreamDetails details)
Declares an upstreamvoid
declareUpstreamSet(String vhost, String name, List<UpstreamSetDetails> details)
Declares an upstream set.void
deleteExchange(String vhost, String name)
void
deletePolicy(String vhost, String name)
void
deleteQueue(String vhost, String name)
void
deleteQueue(String vhost, String name, DeleteQueueParameters deleteInfo)
void
deleteShovel(String vhost, String shovelname)
Deletes the specified shovel from specified virtual host.void
deleteUpstream(String vhost, String name)
Deletes an upstreamvoid
deleteUpstreamSet(String vhost, String name)
Deletes an upstream setvoid
deleteUser(String username)
void
deleteVhost(String name)
InboundMessage
get(String vhost, String queue)
Get one message from a queue and requeue it.List<InboundMessage>
get(String vhost, String queue, int count, GetAckMode ackMode, GetEncoding encoding)
Get messages from a queue, with no limit for message payload truncation.List<InboundMessage>
get(String vhost, String queue, int count, GetAckMode ackMode, GetEncoding encoding, int truncate)
Get messages from a queue.List<BindingInfo>
getBindings()
List<BindingInfo>
getBindings(String vhost)
List<BindingInfo>
getBindingsBySource(String vhost, String exchange)
Returns a list of bindings where provided exchange is the source (other things are bound to it).ChannelInfo
getChannel(String name)
Retrieves state and metrics information for individual channel.List<ChannelInfo>
getChannels()
Retrieves state and metrics information for all channels across the cluster.Page<ChannelInfo>
getChannels(QueryParameters queryParameters)
Retrieves state and metrics information for all channels across the cluster.List<ChannelInfo>
getChannels(String connectionName)
Retrieves state and metrics information for all channels on individual connection.ClusterId
getClusterName()
ConnectionInfo
getConnection(String name)
Retrieves state and metrics information for individual client connection.List<ConnectionInfo>
getConnections()
Retrieves state and metrics information for all client connections across the cluster.Page<ConnectionInfo>
getConnections(QueryParameters queryParameters)
Retrieves state and metrics information for all client connections across the cluster using query parametersList<UserConnectionInfo>
getConnectionsOfUser(String username)
Lists connection that belong to a specific user (used the provided username during authentication).List<ConsumerDetails>
getConsumers()
Retrieves state and metrics information for all consumers across the cluster.List<ConsumerDetails>
getConsumers(String vhost)
Retrieves state and metrics information for all consumers across an individual virtual host.Definitions
getDefinitions()
ExchangeInfo
getExchange(String vhost, String name)
List<BindingInfo>
getExchangeBindingsBetween(String vhost, String source, String destination)
List<BindingInfo>
getExchangeBindingsByDestination(String vhost, String exchange)
Returns a list of bindings where provided exchange is the destination (it is bound to another exchange).List<ExchangeInfo>
getExchanges()
Page<ExchangeInfo>
getExchanges(QueryParameters queryParameters)
List<ExchangeInfo>
getExchanges(String vhost)
Page<ExchangeInfo>
getExchanges(String vhost, QueryParameters queryParameters)
List<Map>
getExtensions()
NodeInfo
getNode(String name)
Retrieves state and metrics information for individual node.List<NodeInfo>
getNodes()
Retrieves state and metrics information for all nodes in the cluster.OverviewResponse
getOverview()
List<UserPermissions>
getPermissions()
UserPermissions
getPermissions(String vhost, String username)
List<UserPermissions>
getPermissionsIn(String vhost)
List<UserPermissions>
getPermissionsOf(String username)
List<PolicyInfo>
getPolicies()
List<PolicyInfo>
getPolicies(String vhost)
QueueInfo
getQueue(String vhost, String name)
QueueInfo
getQueue(String vhost, String name, DetailsParameters detailsParameters)
List<BindingInfo>
getQueueBindings(String vhost, String queue)
Returns a list of bindings where provided queue is the destination.List<BindingInfo>
getQueueBindingsBetween(String vhost, String exchange, String queue)
List<QueueInfo>
getQueues()
List<QueueInfo>
getQueues(DetailsParameters detailsParameters)
Page<QueueInfo>
getQueues(QueryParameters queryParameters)
List<QueueInfo>
getQueues(String vhost)
List<QueueInfo>
getQueues(String vhost, DetailsParameters detailsParameters)
Page<QueueInfo>
getQueues(String vhost, QueryParameters queryParameters)
List<ShovelInfo>
getShovels()
Returns virtual host shovels.List<ShovelInfo>
getShovels(String vhost)
Returns virtual host shovels.List<ShovelStatus>
getShovelsStatus()
Returns virtual host shovels.List<ShovelStatus>
getShovelsStatus(String vhost)
Returns virtual host shovels.List<TopicPermissions>
getTopicPermissions()
List<TopicPermissions>
getTopicPermissions(String vhost, String username)
List<TopicPermissions>
getTopicPermissionsIn(String vhost)
List<TopicPermissions>
getTopicPermissionsOf(String username)
List<UpstreamInfo>
getUpstreams()
Returns a list of upstreams for "/" virtual hostList<UpstreamInfo>
getUpstreams(String vhost)
Returns a list of upstreamsList<UpstreamSetInfo>
getUpstreamSets()
Returns a list of upstream sets for "/" virtual hostList<UpstreamSetInfo>
getUpstreamSets(String vhost)
Returns a list of upstream sets.UserInfo
getUser(String username)
List<UserInfo>
getUsers()
VhostInfo
getVhost(String name)
List<VhostLimits>
getVhostLimits()
Returns the limits (max queues and connections) for all virtual hosts.VhostLimits
getVhostLimits(String vhost)
Returns the limits (max queues and connections) for a given virtual host.List<VhostInfo>
getVhosts()
void
limitMaxNumberOfConnections(String vhost, int limit)
Sets the max number (limit) of connections for a virtual host.void
limitMaxNumberOfQueues(String vhost, int limit)
Sets the max number (limit) of queues for a virtual host.boolean
publish(String vhost, String exchange, String routingKey, OutboundMessage outboundMessage)
Publishes a message to an exchange.void
purgeQueue(String vhost, String name)
void
setClusterName(String name)
void
unbindExchange(String vhost, String destination, String source, String routingKey)
Unbinds a destination exchange from a source one.void
unbindQueue(String vhost, String queue, String exchange, String routingKey)
Unbinds a queue from an exchange.void
updatePermissions(String vhost, String username, UserPermissions permissions)
void
updateTopicPermissions(String vhost, String username, TopicPermissions permissions)
void
updateUser(String username, char[] password, List<String> tags)
CurrentUserDetails
whoAmI()
-
-
-
Field Detail
-
rootUri
protected final URI rootUri
-
-
Constructor Detail
-
Client
public Client(URL url, String username, String password) throws MalformedURLException, URISyntaxException
Construct an instance with the provided url and credentials.- Parameters:
url
- the url e.g. "http://localhost:15672/api/".username
- the username.password
- the password- Throws:
MalformedURLException
- for a badly formed URL.URISyntaxException
- for a badly formed URL.
-
Client
public Client(URL url, String username, String password, SSLContext sslContext) throws MalformedURLException, URISyntaxException
Construct an instance with the provided url and credentials.- Parameters:
url
- the url e.g. "http://localhost:15672/api/".username
- the username.password
- the passwordsslContext
- ssl context for http client- Throws:
MalformedURLException
- for a badly formed URL.URISyntaxException
- for a badly formed URL.
-
Client
public Client(String url) throws MalformedURLException, URISyntaxException
Construct an instance with the provided url and credentials.- Parameters:
url
- the url e.g. "https://guest:guest@localhost:15672/api/".- Throws:
MalformedURLException
- for a badly formed URL.URISyntaxException
- for a badly formed URL.
-
Client
public Client(ClientParameters parameters) throws URISyntaxException, MalformedURLException
Construct an instance with the providedClientParameters
.The instance will use Java 11's
HttpClient
internally.- Parameters:
parameters
- the client parameters to use- Throws:
URISyntaxException
- for a badly formed URL.MalformedURLException
- for a badly formed URL.- Since:
- 3.6.0
-
-
Method Detail
-
getOverview
public OverviewResponse getOverview()
- Returns:
- cluster state overview
-
alivenessTest
public boolean alivenessTest(String vhost)
Performs a basic node aliveness check: declares a queue, publishes a message that routes to it, consumes it, cleans up.- Parameters:
vhost
- vhost to use to perform aliveness check in- Returns:
- true if the check succeeded
-
whoAmI
public CurrentUserDetails whoAmI()
- Returns:
- information about the user used by this client instance
-
getNodes
public List<NodeInfo> getNodes()
Retrieves state and metrics information for all nodes in the cluster.- Returns:
- list of nodes in the cluster
-
getNode
public NodeInfo getNode(String name)
Retrieves state and metrics information for individual node.- Parameters:
name
- node name- Returns:
- node information
-
getConnections
public List<ConnectionInfo> getConnections()
Retrieves state and metrics information for all client connections across the cluster.- Returns:
- list of connections across the cluster
-
getConnections
public Page<ConnectionInfo> getConnections(QueryParameters queryParameters)
Retrieves state and metrics information for all client connections across the cluster using query parameters- Parameters:
queryParameters
-- Returns:
- list of connections across the cluster
-
getConnection
public ConnectionInfo getConnection(String name)
Retrieves state and metrics information for individual client connection.- Parameters:
name
- connection name- Returns:
- connection information
-
getConnectionsOfUser
public List<UserConnectionInfo> getConnectionsOfUser(String username)
Lists connection that belong to a specific user (used the provided username during authentication).- Parameters:
username
- username
-
closeConnection
public void closeConnection(String name)
Forcefully closes individual connection. The client will receive a connection.close method frame.- Parameters:
name
- connection name
-
closeAllConnectionsOfUser
public void closeAllConnectionsOfUser(String username)
Forcefully closes all connections that belong to a specific user (used the provided username during authentication). The client will receive a connection.close method frame.- Parameters:
username
- username
-
closeConnection
public void closeConnection(String name, String reason)
Forcefully closes individual connection with a user-provided message. The client will receive a connection.close method frame.- Parameters:
name
- connection namereason
- the reason of closing
-
getConsumers
public List<ConsumerDetails> getConsumers()
Retrieves state and metrics information for all consumers across the cluster.- Returns:
- list of consumers across the cluster
-
getConsumers
public List<ConsumerDetails> getConsumers(String vhost)
Retrieves state and metrics information for all consumers across an individual virtual host.- Parameters:
vhost
- name of the virtual host- Returns:
- list of consumers in the virtual host (across all nodes)
-
getChannels
public List<ChannelInfo> getChannels()
Retrieves state and metrics information for all channels across the cluster.- Returns:
- list of channels across the cluster
-
getChannels
public Page<ChannelInfo> getChannels(QueryParameters queryParameters)
Retrieves state and metrics information for all channels across the cluster. using query parameters- Parameters:
queryParameters
-- Returns:
- list of channels across the cluster
-
getChannels
public List<ChannelInfo> getChannels(String connectionName)
Retrieves state and metrics information for all channels on individual connection.- Parameters:
connectionName
- the connection name to retrieve channels- Returns:
- list of channels on the connection
-
getChannel
public ChannelInfo getChannel(String name)
Retrieves state and metrics information for individual channel.- Parameters:
name
- channel name- Returns:
- channel information
-
createVhost
public void createVhost(String name, boolean tracing, String description, String... tags)
Create a virtual host with name, tracing flag, and metadata. Note metadata (description and tags) are supported as of RabbitMQ 3.8.- Parameters:
name
- name of the virtual hosttracing
- whether tracing is enabled or notdescription
- virtual host description (requires RabbitMQ 3.8 or more)tags
- virtual host tags (requires RabbitMQ 3.8 or more)- Since:
- 3.4.0
-
createVhost
public void createVhost(String name, String description, String... tags)
Create a virtual host with name and metadata. Note metadata (description and tags) are supported as of RabbitMQ 3.8.- Parameters:
name
- name of the virtual hostdescription
- virtual host description (requires RabbitMQ 3.8 or more)tags
- virtual host tags (requires RabbitMQ 3.8 or more)- Since:
- 3.4.0
-
createVhost
public void createVhost(String name, boolean tracing)
Create a virtual host with name and tracing flag.- Parameters:
name
- name of the virtual hosttracing
- whether tracing is enabled or not- Since:
- 3.4.0
-
createVhost
public void createVhost(String name)
-
deleteVhost
public void deleteVhost(String name)
-
getPermissionsIn
public List<UserPermissions> getPermissionsIn(String vhost)
-
getPermissionsOf
public List<UserPermissions> getPermissionsOf(String username)
-
getPermissions
public List<UserPermissions> getPermissions()
-
getPermissions
public UserPermissions getPermissions(String vhost, String username)
-
getTopicPermissionsIn
public List<TopicPermissions> getTopicPermissionsIn(String vhost)
-
getTopicPermissionsOf
public List<TopicPermissions> getTopicPermissionsOf(String username)
-
getTopicPermissions
public List<TopicPermissions> getTopicPermissions()
-
getTopicPermissions
public List<TopicPermissions> getTopicPermissions(String vhost, String username)
-
getExchanges
public List<ExchangeInfo> getExchanges()
-
getExchanges
public Page<ExchangeInfo> getExchanges(QueryParameters queryParameters)
-
getExchanges
public List<ExchangeInfo> getExchanges(String vhost)
-
getExchanges
public Page<ExchangeInfo> getExchanges(String vhost, QueryParameters queryParameters)
-
getExchange
public ExchangeInfo getExchange(String vhost, String name)
-
declareExchange
public void declareExchange(String vhost, String name, ExchangeInfo info)
-
publish
public boolean publish(String vhost, String exchange, String routingKey, OutboundMessage outboundMessage)
Publishes a message to an exchange.DO NOT USE THIS METHOD IN PRODUCTION. The HTTP API has to create a new TCP connection for each message published, which is highly suboptimal.
Use this method for test or development code only. In production, use AMQP 0-9-1 or any other messaging protocol that uses a long-lived connection.
- Parameters:
vhost
- the virtual host to useexchange
- the target exchangeroutingKey
- the routing key to useoutboundMessage
- the message to publish- Returns:
- true if message has been routed to at least a queue, false otherwise
- Since:
- 3.4.0
-
getQueues
public List<QueueInfo> getQueues(DetailsParameters detailsParameters)
-
getQueues
public List<QueueInfo> getQueues(String vhost, DetailsParameters detailsParameters)
-
getQueues
public Page<QueueInfo> getQueues(String vhost, QueryParameters queryParameters)
-
getQueue
public QueueInfo getQueue(String vhost, String name, DetailsParameters detailsParameters)
-
getQueues
public Page<QueueInfo> getQueues(QueryParameters queryParameters)
-
declarePolicy
public void declarePolicy(String vhost, String name, PolicyInfo info)
-
deleteQueue
public void deleteQueue(String vhost, String name, DeleteQueueParameters deleteInfo)
-
get
public List<InboundMessage> get(String vhost, String queue, int count, GetAckMode ackMode, GetEncoding encoding, int truncate)
Get messages from a queue. DO NOT USE THIS METHOD IN PRODUCTION. Getting messages with the HTTP API is intended for diagnostics or tests. It does not implement reliable delivery and so should be treated as a sysadmin's tool rather than a general API for messaging.- Parameters:
vhost
- the virtual host the target queue is inqueue
- the queue to consume fromcount
- the maximum number of messages to getackMode
- determines whether the messages will be removed from the queueencoding
- the expected encoding of the message payloadtruncate
- to truncate the message payload if it is larger than the size given (in bytes), -1 means no truncation- Returns:
- the list of messages
- Since:
- 3.4.0
- See Also:
GetAckMode
,GetEncoding
-
get
public List<InboundMessage> get(String vhost, String queue, int count, GetAckMode ackMode, GetEncoding encoding)
Get messages from a queue, with no limit for message payload truncation. DO NOT USE THIS METHOD IN PRODUCTION. Getting messages with the HTTP API is intended for diagnostics or tests. It does not implement reliable delivery and so should be treated as a sysadmin's tool rather than a general API for messaging.- Parameters:
vhost
- the virtual host the target queue is inqueue
- the queue to consume fromcount
- the maximum number of messages to getackMode
- determines whether the messages will be removed from the queueencoding
- the expected encoding of the message payload- Returns:
- the list of messages
- Since:
- 3.4.0
- See Also:
GetAckMode
,GetEncoding
-
get
public InboundMessage get(String vhost, String queue)
Get one message from a queue and requeue it. DO NOT USE THIS METHOD IN PRODUCTION. Getting messages with the HTTP API is intended for diagnostics or tests. It does not implement reliable delivery and so should be treated as a sysadmin's tool rather than a general API for messaging.- Parameters:
vhost
- the virtual host the target queue is inqueue
- the queue to consume from- Returns:
- the message, null if the queue is empty
- Since:
- 3.4.0
- See Also:
GetAckMode
,GetEncoding
-
createUserWithPasswordHash
public void createUserWithPasswordHash(String username, char[] passwordHash, List<String> tags)
-
deleteUser
public void deleteUser(String username)
-
updatePermissions
public void updatePermissions(String vhost, String username, UserPermissions permissions)
-
updateTopicPermissions
public void updateTopicPermissions(String vhost, String username, TopicPermissions permissions)
-
getPolicies
public List<PolicyInfo> getPolicies()
-
getPolicies
public List<PolicyInfo> getPolicies(String vhost)
-
getBindings
public List<BindingInfo> getBindings()
-
getBindings
public List<BindingInfo> getBindings(String vhost)
-
getBindingsBySource
public List<BindingInfo> getBindingsBySource(String vhost, String exchange)
Returns a list of bindings where provided exchange is the source (other things are bound to it).- Parameters:
vhost
- vhost of the exchangeexchange
- source exchange name- Returns:
- list of bindings
-
getExchangeBindingsByDestination
public List<BindingInfo> getExchangeBindingsByDestination(String vhost, String exchange)
Returns a list of bindings where provided exchange is the destination (it is bound to another exchange).- Parameters:
vhost
- vhost of the exchangeexchange
- destination exchange name- Returns:
- list of bindings
-
getQueueBindings
public List<BindingInfo> getQueueBindings(String vhost, String queue)
Returns a list of bindings where provided queue is the destination.- Parameters:
vhost
- vhost of the exchangequeue
- destination queue name- Returns:
- list of bindings
-
getQueueBindingsBetween
public List<BindingInfo> getQueueBindingsBetween(String vhost, String exchange, String queue)
-
getExchangeBindingsBetween
public List<BindingInfo> getExchangeBindingsBetween(String vhost, String source, String destination)
-
bindQueue
public void bindQueue(String vhost, String queue, String exchange, String routingKey)
Binds a queue to an exchange.- Parameters:
vhost
- virtual host the queue and exchange are inqueue
- the queue nameexchange
- the exchange nameroutingKey
- the routing key to use
-
bindQueue
public void bindQueue(String vhost, String queue, String exchange, String routingKey, Map<String,Object> args)
Binds a queue to an exchange.- Parameters:
vhost
- virtual host the queue and exchange are inqueue
- the queue nameexchange
- the exchange nameroutingKey
- the routing key to useargs
- additional map of arguments (used by some exchange types)
-
unbindQueue
public void unbindQueue(String vhost, String queue, String exchange, String routingKey)
Unbinds a queue from an exchange.- Parameters:
vhost
- virtual host the queue and exchange are inqueue
- the queue nameexchange
- the exchange nameroutingKey
- the routing key used when binding
-
bindExchange
public void bindExchange(String vhost, String destination, String source, String routingKey)
Binds a destination exchange to a source one.- Parameters:
vhost
- virtual host the exchanges are indestination
- the destination exchange namesource
- the source exchange nameroutingKey
- the routing key to use
-
bindExchange
public void bindExchange(String vhost, String destination, String source, String routingKey, Map<String,Object> args)
Binds a destination exchange to a source one.- Parameters:
vhost
- virtual host the exchanges are indestination
- the destination exchange namesource
- the source exchange nameroutingKey
- the routing key to useargs
- additional map of arguments (used by some exchange types)
-
unbindExchange
public void unbindExchange(String vhost, String destination, String source, String routingKey)
Unbinds a destination exchange from a source one.- Parameters:
vhost
- virtual host the exchanges are indestination
- the destination exchange namesource
- the source exchange nameroutingKey
- the routing key used when binding
-
getClusterName
public ClusterId getClusterName()
-
setClusterName
public void setClusterName(String name)
-
getDefinitions
public Definitions getDefinitions()
-
declareShovel
public void declareShovel(String vhost, ShovelInfo info)
Declares a shovel.- Parameters:
vhost
- virtual host where to declare the shovelinfo
- Shovel info.
-
getShovels
public List<ShovelInfo> getShovels()
Returns virtual host shovels.- Returns:
- Shovels.
-
getShovels
public List<ShovelInfo> getShovels(String vhost)
Returns virtual host shovels.- Parameters:
vhost
- Virtual host from where search shovels.- Returns:
- Shovels.
-
getShovelsStatus
public List<ShovelStatus> getShovelsStatus()
Returns virtual host shovels.- Returns:
- Shovels.
-
getShovelsStatus
public List<ShovelStatus> getShovelsStatus(String vhost)
Returns virtual host shovels.- Parameters:
vhost
- Virtual host from where search shovels.- Returns:
- Shovels.
-
deleteShovel
public void deleteShovel(String vhost, String shovelname)
Deletes the specified shovel from specified virtual host.- Parameters:
vhost
- virtual host from where to delete the shovelshovelname
- Shovel to be deleted.
-
declareUpstream
public void declareUpstream(String vhost, String name, UpstreamDetails details)
Declares an upstream- Parameters:
vhost
- virtual host for which to declare the upstreamname
- name of the upstream to declaredetails
- upstream arguments
-
deleteUpstream
public void deleteUpstream(String vhost, String name)
Deletes an upstream- Parameters:
vhost
- virtual host for which to delete the upstreamname
- name of the upstream to delete
-
getUpstreams
public List<UpstreamInfo> getUpstreams()
Returns a list of upstreams for "/" virtual host- Returns:
- upstream info
-
getUpstreams
public List<UpstreamInfo> getUpstreams(String vhost)
Returns a list of upstreams- Parameters:
vhost
- virtual host the upstreams are in.- Returns:
- upstream info
-
declareUpstreamSet
public void declareUpstreamSet(String vhost, String name, List<UpstreamSetDetails> details)
Declares an upstream set.- Parameters:
vhost
- virtual host for which to declare the upstream setname
- name of the upstream set to declaredetails
- upstream set arguments
-
deleteUpstreamSet
public void deleteUpstreamSet(String vhost, String name)
Deletes an upstream set- Parameters:
vhost
- virtual host for which to delete the upstream setname
- name of the upstream set to delete
-
getUpstreamSets
public List<UpstreamSetInfo> getUpstreamSets()
Returns a list of upstream sets for "/" virtual host- Returns:
- upstream info
-
getUpstreamSets
public List<UpstreamSetInfo> getUpstreamSets(String vhost)
Returns a list of upstream sets.- Parameters:
vhost
- Virtual host from where to get upstreams.- Returns:
- upstream set info
-
getVhostLimits
public List<VhostLimits> getVhostLimits()
Returns the limits (max queues and connections) for all virtual hosts.- Returns:
- the limits
- Since:
- 3.7.0
-
getVhostLimits
public VhostLimits getVhostLimits(String vhost)
Returns the limits (max queues and connections) for a given virtual host.- Parameters:
vhost
- the virtual host- Returns:
- the limits for this virtual host
- Since:
- 3.7.0
-
limitMaxNumberOfConnections
public void limitMaxNumberOfConnections(String vhost, int limit)
Sets the max number (limit) of connections for a virtual host.- Parameters:
vhost
- the virtual hostlimit
- the max number of connections allowed- Since:
- 3.7.0
-
limitMaxNumberOfQueues
public void limitMaxNumberOfQueues(String vhost, int limit)
Sets the max number (limit) of queues for a virtual host.- Parameters:
vhost
- the virtual hostlimit
- the max number of queues allowed- Since:
- 3.7.0
-
clearMaxConnectionsLimit
public void clearMaxConnectionsLimit(String vhost)
Clears the connection limit for a virtual host.- Parameters:
vhost
- the virtual host- Since:
- 3.7.0
-
clearMaxQueuesLimit
public void clearMaxQueuesLimit(String vhost)
Clears the queue limit for a virtual host.- Parameters:
vhost
- the virtual host- Since:
- 3.7.0
-
-