Interface AddressControl
public interface AddressControl
An AddressControl is used to manage an address.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
block()
Blocks message production to this address by limiting creditboolean
Returns the name of this address.int
Returns the % of memory limit that is currently in use.long
Returns the number of estimated bytes being used by all the queue(s) bound to this address; used to control paging and blocking.String[]
Returns the names of both the local and remote queue(s) bound to this address.String[]
Returns the names of all bindings (both queues and diverts) bound to this address.long
long
getId()
Returns the internal ID of this address.int
Returns the maximum number of bytes that can be read into memory from paged files.int
Returns the maximum number of messages that can be read into memory from paged files.long
Returns number of messages currently in all queues bound to this address (includes scheduled, paged, and in-delivery messages).long
Returns the number of bytes used by each page for this address.long
Deprecated.long
Returns the number of pages used by this address.int
Returns the number of bytes to prefetch from storage into memory before reching maxReadBytes.int
Returns the number of messages prefetch from storage into memory before reching maxReadBytes.long
Returns number of local queues bound to this address.String[]
Returns the names of the local queue(s) bound to this address.String[]
Returns the names of the remote queue(s) bound to this address.Object[]
getRoles()
Returns the roles (name and permissions) associated with this address.Returns the roles (name and permissions) associated with this address using JSON serialization. Java objects can be recreated from JSON serialization usingRoleInfo.from(String)
.long
Returns the number of messages routed to one or more bindings.String[]
Returns the routing types enabled on this address.Returns the routing types enabled on this address as JSON.long
Returns the number of messages not routed to any bindings.boolean
Returns whether this address was created automatically in response to client action.boolean
Returns whether this address was created for the broker's internal use.boolean
isPaging()
Returns whether this address is paging.boolean
isPaused()
boolean
boolean
Returns whether this address is temporary.void
pause()
Pauses all the queues bound to this address.void
pause
(boolean persist) Pauses all the queues bound to this address.long
purge()
Purge all the queues bound of this address.void
void
void
resume()
Resume all the queues bound of this address.void
sendMessage
(Map<String, String> headers, int type, String body, boolean durable, String user, String password) Sends a TextMessage to a password-protected address.sendMessage
(Map<String, String> headers, int type, String body, boolean durable, String user, String password, boolean createMessageId) Sends a TextMessage to a password-protected address.void
unblock()
-
Field Details
-
ROUTED_MESSAGE_COUNT_DESCRIPTION
- See Also:
-
UNROUTED_MESSAGE_COUNT_DESCRIPTION
- See Also:
-
ADDRESS_SIZE_DESCRIPTION
- See Also:
-
NUMBER_OF_PAGES_DESCRIPTION
- See Also:
-
LIMIT_PERCENT_DESCRIPTION
- See Also:
-
-
Method Details
-
getId
long getId()Returns the internal ID of this address.- Returns:
- the internal ID of this address
-
getAddress
String getAddress()Returns the name of this address.- Returns:
- the name of this address
-
getRoutingTypes
String[] getRoutingTypes()Returns the routing types enabled on this address.- Returns:
- the routing types enabled on this address
-
getRoutingTypesAsJSON
String getRoutingTypesAsJSON()Returns the routing types enabled on this address as JSON.- Returns:
- the routing types enabled on this address as JSON
-
getRoles
Returns the roles (name and permissions) associated with this address.- Returns:
- the roles (name and permissions) associated with this address
- Throws:
Exception
-
getRolesAsJSON
Returns the roles (name and permissions) associated with this address using JSON serialization.Java objects can be recreated from JSON serialization using
RoleInfo.from(String)
..- Returns:
- the roles (name and permissions) associated with this address using JSON serialization.
Java objects can be recreated from JSON serialization using
RoleInfo.from(String)
- Throws:
Exception
-
getAddressSize
long getAddressSize()Returns the number of estimated bytes being used by all the queue(s) bound to this address; used to control paging and blocking.- Returns:
- the number of estimated bytes being used by all the queue(s) bound to this address; used to control paging and blocking
-
getMaxPageReadBytes
int getMaxPageReadBytes()Returns the maximum number of bytes that can be read into memory from paged files.- Returns:
- the maximum number of bytes that can be read into memory from paged files
-
getMaxPageReadMessages
int getMaxPageReadMessages()Returns the maximum number of messages that can be read into memory from paged files.- Returns:
- the maximum number of messages that can be read into memory from paged files
-
getPrefetchPageBytes
int getPrefetchPageBytes()Returns the number of bytes to prefetch from storage into memory before reching maxReadBytes.- Returns:
- the number of bytes to prefetch from storage into memory before reching maxReadBytes
-
getPrefetchPageMessages
int getPrefetchPageMessages()Returns the number of messages prefetch from storage into memory before reching maxReadBytes.- Returns:
- the number of messages prefetch from storage into memory before reching maxReadBytes
-
schedulePageCleanup
- Throws:
Exception
-
getNumberOfMessages
Deprecated.Returns the sum of messages on queue(s), including messages in delivery.- Returns:
- the sum of messages on queue(s), including messages in delivery
-
getRemoteQueueNames
String[] getRemoteQueueNames()Returns the names of the remote queue(s) bound to this address.- Returns:
- the names of the remote queue(s) bound to this address
-
getQueueNames
String[] getQueueNames()Returns the names of the local queue(s) bound to this address.- Returns:
- the names of the local queue(s) bound to this address
-
getAllQueueNames
String[] getAllQueueNames()Returns the names of both the local and remote queue(s) bound to this address.- Returns:
- the names of both the local and remote queue(s) bound to this address
-
getNumberOfPages
long getNumberOfPages()Returns the number of pages used by this address.- Returns:
- the number of pages used by this address
-
isPaging
Returns whether this address is paging.- Returns:
- whether this address is paging
- Throws:
Exception
-
getAddressLimitPercent
int getAddressLimitPercent()Returns the % of memory limit that is currently in use.- Returns:
- the % of memory limit that is currently in use
-
block
Blocks message production to this address by limiting credit- Returns:
true
if production is blocked- Throws:
Exception
-
unblock
- Throws:
Exception
-
getNumberOfBytesPerPage
Returns the number of bytes used by each page for this address.- Returns:
- the number of bytes used by each page for this address
- Throws:
Exception
-
getBindingNames
Returns the names of all bindings (both queues and diverts) bound to this address.- Returns:
- the names of all bindings (both queues and diverts) bound to this address
- Throws:
Exception
-
getQueueCount
long getQueueCount()Returns number of local queues bound to this address.- Returns:
- number of local queues bound to this address
-
getMessageCount
long getMessageCount()Returns number of messages currently in all queues bound to this address (includes scheduled, paged, and in-delivery messages).- Returns:
- number of messages currently in all queues bound to this address (includes scheduled, paged, and in-delivery messages)
-
getRoutedMessageCount
long getRoutedMessageCount()Returns the number of messages routed to one or more bindings.- Returns:
- the number of messages routed to one or more bindings
-
getUnRoutedMessageCount
long getUnRoutedMessageCount()Returns the number of messages not routed to any bindings.- Returns:
- the number of messages not routed to any bindings
-
sendMessage
String sendMessage(Map<String, String> headers, int type, String body, boolean durable, String user, String password) throws ExceptionSends a TextMessage to a password-protected address.- Parameters:
headers
- the message headers and properties to set. Can only container Strings maped to primitive types.body
- the text to send- Throws:
Exception
-
sendMessage
String sendMessage(Map<String, String> headers, int type, String body, boolean durable, String user, String password, boolean createMessageId) throws ExceptionSends a TextMessage to a password-protected address.- Parameters:
headers
- the message headers and properties to set. Can only container Strings maped to primitive types.body
- the text to sendcreateMessageId
- whether to auto generate a Message ID- Throws:
Exception
-
pause
Pauses all the queues bound to this address. Messages are no longer delivered to all its bounded queues. Newly added queue will be paused too until resume is called.- Throws:
Exception
-
pause
Pauses all the queues bound to this address. Messages are no longer delivered to all its bounded queues. Newly added queue will be paused too until resume is called.- Parameters:
persist
- iftrue
, the pause state will be persisted.- Throws:
Exception
-
resume
Resume all the queues bound of this address. Messages are delivered again to all its bounded queues.- Throws:
Exception
-
isPaused
boolean isPaused() -
isRetroactiveResource
boolean isRetroactiveResource() -
getCurrentDuplicateIdCacheSize
long getCurrentDuplicateIdCacheSize() -
clearDuplicateIdCache
- Throws:
Exception
-
isAutoCreated
boolean isAutoCreated()Returns whether this address was created automatically in response to client action.- Returns:
- whether this address was created automatically in response to client action
-
isInternal
boolean isInternal()Returns whether this address was created for the broker's internal use.- Returns:
- whether this address was created for the broker's internal use
-
isTemporary
boolean isTemporary()Returns whether this address is temporary.- Returns:
- whether this address is temporary
-
purge
Purge all the queues bound of this address. Returns the total number of messages purged.- Throws:
Exception
-
replay
- Throws:
Exception
-
replay
- Throws:
Exception
-