Interface AddressControl
-
public interface AddressControlAn AddressControl is used to manage an address.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringADDRESS_SIZE_DESCRIPTIONstatic java.lang.StringNUMBER_OF_PAGES_DESCRIPTIONstatic java.lang.StringROUTED_MESSAGE_COUNT_DESCRIPTIONstatic java.lang.StringUNROUTED_MESSAGE_COUNT_DESCRIPTION
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanblock()Blocks message production to this address by limiting creditbooleanclearDuplicateIdCache()java.lang.StringgetAddress()Returns the managed address.intgetAddressLimitPercent()Returns the % of memory limit that is currently in uselonggetAddressSize()Returns the number of estimated bytes being used by all the queue(s) bound to this address; used to control paging and blocking.java.lang.String[]getAllQueueNames()Returns the names of both the local and remote queue(s) bound to this address.java.lang.String[]getBindingNames()Returns the names of all bindings (both queues and diverts) bound to this addresslonggetCurrentDuplicateIdCacheSize()longgetMessageCount()longgetNumberOfBytesPerPage()Returns the number of bytes used by each page for this address.longgetNumberOfMessages()Returns the sum of messages on queue(s), including messages in delivery.intgetNumberOfPages()Returns the number of pages used by this address.java.lang.String[]getQueueNames()Returns the names of the local queue(s) bound to this address.java.lang.String[]getRemoteQueueNames()Returns the names of the remote queue(s) bound to this address.java.lang.Object[]getRoles()Returns the roles (name and permissions) associated with this address.java.lang.StringgetRolesAsJSON()Returns the roles (name and permissions) associated with this address using JSON serialization.longgetRoutedMessageCount()Returns the number of messages routed to one or more bindingsjava.lang.String[]getRoutingTypes()java.lang.StringgetRoutingTypesAsJSON()longgetUnRoutedMessageCount()Returns the number of messages not routed to any bindingsbooleanisAutoCreated()Returns whether this address was created automatically in response to client action.booleanisInternal()Returns whether this address was created for the broker's internal use.booleanisPaging()Returns whether this address is paging.booleanisPaused()booleanisRetroactiveResource()booleanisTemporary()Returns whether this address is temporary.voidpause()Pauses all the queues bound to this address.voidpause(boolean persist)Pauses all the queues bound to this address.longpurge()Purge all the queues bound of this address.voidreplay(java.lang.String target, java.lang.String filter)voidreplay(java.lang.String startScan, java.lang.String endScan, java.lang.String target, java.lang.String filter)voidresume()Resume all the queues bound of this address.java.lang.StringsendMessage(java.util.Map<java.lang.String,java.lang.String> headers, int type, java.lang.String body, boolean durable, java.lang.String user, java.lang.String password)java.lang.StringsendMessage(java.util.Map<java.lang.String,java.lang.String> headers, int type, java.lang.String body, boolean durable, java.lang.String user, java.lang.String password, boolean createMessageId)voidunblock()
-
-
-
Field Detail
-
ROUTED_MESSAGE_COUNT_DESCRIPTION
static final java.lang.String ROUTED_MESSAGE_COUNT_DESCRIPTION
- See Also:
- Constant Field Values
-
UNROUTED_MESSAGE_COUNT_DESCRIPTION
static final java.lang.String UNROUTED_MESSAGE_COUNT_DESCRIPTION
- See Also:
- Constant Field Values
-
ADDRESS_SIZE_DESCRIPTION
static final java.lang.String ADDRESS_SIZE_DESCRIPTION
- See Also:
- Constant Field Values
-
NUMBER_OF_PAGES_DESCRIPTION
static final java.lang.String NUMBER_OF_PAGES_DESCRIPTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAddress
java.lang.String getAddress()
Returns the managed address.
-
getRoutingTypes
java.lang.String[] getRoutingTypes()
-
getRoutingTypesAsJSON
java.lang.String getRoutingTypesAsJSON() throws java.lang.Exception- Throws:
java.lang.Exception
-
getRoles
java.lang.Object[] getRoles() throws java.lang.ExceptionReturns the roles (name and permissions) associated with this address.- Throws:
java.lang.Exception
-
getRolesAsJSON
java.lang.String getRolesAsJSON() throws java.lang.ExceptionReturns the roles (name and permissions) associated with this address using JSON serialization.
Java objects can be recreated from JSON serialization usingRoleInfo.from(String).- Throws:
java.lang.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.
-
getNumberOfMessages
long getNumberOfMessages() throws java.lang.ExceptionReturns the sum of messages on queue(s), including messages in delivery.- Throws:
java.lang.Exception
-
getRemoteQueueNames
java.lang.String[] getRemoteQueueNames() throws java.lang.ExceptionReturns the names of the remote queue(s) bound to this address.- Throws:
java.lang.Exception
-
getQueueNames
java.lang.String[] getQueueNames() throws java.lang.ExceptionReturns the names of the local queue(s) bound to this address.- Throws:
java.lang.Exception
-
getAllQueueNames
java.lang.String[] getAllQueueNames() throws java.lang.ExceptionReturns the names of both the local and remote queue(s) bound to this address.- Throws:
java.lang.Exception
-
getNumberOfPages
int getNumberOfPages()
Returns the number of pages used by this address.
-
isPaging
boolean isPaging() throws java.lang.ExceptionReturns whether this address is paging.- Throws:
java.lang.Exception
-
getAddressLimitPercent
int getAddressLimitPercent() throws java.lang.ExceptionReturns the % of memory limit that is currently in use- Throws:
java.lang.Exception
-
block
boolean block() throws java.lang.ExceptionBlocks message production to this address by limiting credit- Returns:
- true if production is blocked
- Throws:
java.lang.Exception
-
unblock
void unblock() throws java.lang.Exception- Throws:
java.lang.Exception
-
getNumberOfBytesPerPage
long getNumberOfBytesPerPage() throws java.lang.ExceptionReturns the number of bytes used by each page for this address.- Throws:
java.lang.Exception
-
getBindingNames
java.lang.String[] getBindingNames() throws java.lang.ExceptionReturns the names of all bindings (both queues and diverts) bound to this address- Throws:
java.lang.Exception
-
getMessageCount
long getMessageCount()
-
getRoutedMessageCount
long getRoutedMessageCount()
Returns the number of messages routed to one or more bindings
-
getUnRoutedMessageCount
long getUnRoutedMessageCount()
Returns the number of messages not routed to any bindings
-
sendMessage
java.lang.String sendMessage(java.util.Map<java.lang.String,java.lang.String> headers, int type, java.lang.String body, boolean durable, java.lang.String user, java.lang.String password) throws java.lang.Exception- Parameters:
headers- the message headers and properties to set. Can only container Strings maped to primitive types.body- the text to senddurable-user-password-- Returns:
- Throws:
java.lang.Exception
-
sendMessage
java.lang.String sendMessage(java.util.Map<java.lang.String,java.lang.String> headers, int type, java.lang.String body, boolean durable, java.lang.String user, java.lang.String password, boolean createMessageId) throws java.lang.Exception- Parameters:
headers- the message headers and properties to set. Can only container Strings maped to primitive types.body- the text to senddurable-user-password-createMessageId- whether or not to auto generate a Message ID- Returns:
- Throws:
java.lang.Exception
-
pause
void pause() throws java.lang.ExceptionPauses 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:
java.lang.Exception
-
pause
void pause(boolean persist) throws java.lang.ExceptionPauses 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- if true, the pause state will be persisted.- Throws:
java.lang.Exception
-
resume
void resume() throws java.lang.ExceptionResume all the queues bound of this address. Messages are delivered again to all its bounded queues.- Throws:
java.lang.Exception
-
isPaused
boolean isPaused()
-
isRetroactiveResource
boolean isRetroactiveResource()
-
getCurrentDuplicateIdCacheSize
long getCurrentDuplicateIdCacheSize()
-
clearDuplicateIdCache
boolean clearDuplicateIdCache() throws java.lang.Exception- Throws:
java.lang.Exception
-
isAutoCreated
boolean isAutoCreated()
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.
-
isTemporary
boolean isTemporary()
Returns whether this address is temporary.
-
purge
long purge() throws java.lang.ExceptionPurge all the queues bound of this address. Returns the total number of messages purged.- Throws:
java.lang.Exception
-
replay
void replay(java.lang.String target, java.lang.String filter) throws java.lang.Exception- Throws:
java.lang.Exception
-
replay
void replay(java.lang.String startScan, java.lang.String endScan, java.lang.String target, java.lang.String filter) throws java.lang.Exception- Throws:
java.lang.Exception
-
-