Class AddressControlImpl
java.lang.Object
javax.management.StandardMBean
org.apache.activemq.artemis.core.management.impl.AbstractControl
org.apache.activemq.artemis.core.management.impl.AddressControlImpl
- All Implemented Interfaces:
DynamicMBean,MBeanRegistration,AddressControl
-
Field Summary
Fields inherited from class org.apache.activemq.artemis.core.management.impl.AbstractControl
storageManagerFields inherited from interface org.apache.activemq.artemis.api.core.management.AddressControl
ADDRESS_SIZE_DESCRIPTION, LIMIT_PERCENT_DESCRIPTION, NUMBER_OF_PAGES_DESCRIPTION, ROUTED_MESSAGE_COUNT_DESCRIPTION, UNROUTED_MESSAGE_COUNT_DESCRIPTION -
Constructor Summary
ConstructorsConstructorDescriptionAddressControlImpl(AddressInfo addressInfo, ActiveMQServer server, PagingManager pagingManager, StorageManager storageManager, HierarchicalRepository<Set<Role>> securityRepository, SecurityStore securityStore, ManagementService managementService) -
Method Summary
Modifier and TypeMethodDescriptionbooleanblock()Blocks message production to this address by limiting creditbooleanprotected MBeanAttributeInfo[]protected MBeanOperationInfo[]Returns the name of this address.intReturns the % of memory limit that is currently in use.longReturns 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.longlonggetId()Returns the internal ID of this address.intReturns the maximum number of bytes that can be read into memory from paged files.intReturns the maximum number of messages that can be read into memory from paged files.longReturns number of messages currently in all queues bound to this address (includes scheduled, paged, and in-delivery messages).longReturns the number of bytes used by each page for this address.longDeprecated.longReturns the number of pages used by this address.intReturns the number of bytes to prefetch from storage into memory before reching maxReadBytes.intReturns the number of messages prefetch from storage into memory before reching maxReadBytes.longReturns 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).longReturns 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.longReturns the number of messages not routed to any bindings.booleanReturns whether this address was created automatically in response to client action.booleanReturns whether this address was created for the broker's internal use.booleanisPaging()Returns whether this address is paging.booleanisPaused()booleanbooleanReturns 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.voidvoidvoidresume()Resume all the queues bound of this address.voidsendMessage(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.voidunblock()Methods inherited from class org.apache.activemq.artemis.core.management.impl.AbstractControl
blockOnIO, clearIO, getMBeanInfo, sendMessage, tcclCall, tcclInvokeMethods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
-
Constructor Details
-
AddressControlImpl
public AddressControlImpl(AddressInfo addressInfo, ActiveMQServer server, PagingManager pagingManager, StorageManager storageManager, HierarchicalRepository<Set<Role>> securityRepository, SecurityStore securityStore, ManagementService managementService) throws Exception - Throws:
Exception
-
-
Method Details
-
getId
public long getId()Description copied from interface:AddressControlReturns the internal ID of this address.- Specified by:
getIdin interfaceAddressControl- Returns:
- the internal ID of this address
-
getAddress
Description copied from interface:AddressControlReturns the name of this address.- Specified by:
getAddressin interfaceAddressControl- Returns:
- the name of this address
-
getRoutingTypes
Description copied from interface:AddressControlReturns the routing types enabled on this address.- Specified by:
getRoutingTypesin interfaceAddressControl- Returns:
- the routing types enabled on this address
-
getRoutingTypesAsJSON
Description copied from interface:AddressControlReturns the routing types enabled on this address as JSON.- Specified by:
getRoutingTypesAsJSONin interfaceAddressControl- Returns:
- the routing types enabled on this address as JSON
-
getRemoteQueueNames
Description copied from interface:AddressControlReturns the names of the remote queue(s) bound to this address.- Specified by:
getRemoteQueueNamesin interfaceAddressControl- Returns:
- the names of the remote queue(s) bound to this address
-
getQueueNames
Description copied from interface:AddressControlReturns the names of the local queue(s) bound to this address.- Specified by:
getQueueNamesin interfaceAddressControl- Returns:
- the names of the local queue(s) bound to this address
-
getAllQueueNames
Description copied from interface:AddressControlReturns the names of both the local and remote queue(s) bound to this address.- Specified by:
getAllQueueNamesin interfaceAddressControl- Returns:
- the names of both the local and remote queue(s) bound to this address
-
getBindingNames
Description copied from interface:AddressControlReturns the names of all bindings (both queues and diverts) bound to this address.- Specified by:
getBindingNamesin interfaceAddressControl- Returns:
- the names of all bindings (both queues and diverts) bound to this address
- Throws:
Exception
-
getRoles
Description copied from interface:AddressControlReturns the roles (name and permissions) associated with this address.- Specified by:
getRolesin interfaceAddressControl- Returns:
- the roles (name and permissions) associated with this address
- Throws:
Exception
-
getRolesAsJSON
Description copied from interface:AddressControlReturns the roles (name and permissions) associated with this address using JSON serialization.Java objects can be recreated from JSON serialization using
RoleInfo.from(String)..- Specified by:
getRolesAsJSONin interfaceAddressControl- 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
-
getNumberOfBytesPerPage
Description copied from interface:AddressControlReturns the number of bytes used by each page for this address.- Specified by:
getNumberOfBytesPerPagein interfaceAddressControl- Returns:
- the number of bytes used by each page for this address
- Throws:
Exception
-
getAddressSize
public long getAddressSize()Description copied from interface:AddressControlReturns the number of estimated bytes being used by all the queue(s) bound to this address; used to control paging and blocking.- Specified by:
getAddressSizein interfaceAddressControl- Returns:
- the number of estimated bytes being used by all the queue(s) bound to this address; used to control paging and blocking
-
getMaxPageReadBytes
public int getMaxPageReadBytes()Description copied from interface:AddressControlReturns the maximum number of bytes that can be read into memory from paged files.- Specified by:
getMaxPageReadBytesin interfaceAddressControl- Returns:
- the maximum number of bytes that can be read into memory from paged files
-
getMaxPageReadMessages
public int getMaxPageReadMessages()Description copied from interface:AddressControlReturns the maximum number of messages that can be read into memory from paged files.- Specified by:
getMaxPageReadMessagesin interfaceAddressControl- Returns:
- the maximum number of messages that can be read into memory from paged files
-
getPrefetchPageBytes
public int getPrefetchPageBytes()Description copied from interface:AddressControlReturns the number of bytes to prefetch from storage into memory before reching maxReadBytes.- Specified by:
getPrefetchPageBytesin interfaceAddressControl- Returns:
- the number of bytes to prefetch from storage into memory before reching maxReadBytes
-
getPrefetchPageMessages
public int getPrefetchPageMessages()Description copied from interface:AddressControlReturns the number of messages prefetch from storage into memory before reching maxReadBytes.- Specified by:
getPrefetchPageMessagesin interfaceAddressControl- Returns:
- the number of messages prefetch from storage into memory before reching maxReadBytes
-
schedulePageCleanup
- Specified by:
schedulePageCleanupin interfaceAddressControl- Throws:
Exception
-
getNumberOfMessages
Deprecated.Description copied from interface:AddressControlReturns the sum of messages on queue(s), including messages in delivery.- Specified by:
getNumberOfMessagesin interfaceAddressControl- Returns:
- the sum of messages on queue(s), including messages in delivery
-
isPaging
Description copied from interface:AddressControlReturns whether this address is paging.- Specified by:
isPagingin interfaceAddressControl- Returns:
- whether this address is paging
- Throws:
Exception
-
getAddressLimitPercent
public int getAddressLimitPercent()Description copied from interface:AddressControlReturns the % of memory limit that is currently in use.- Specified by:
getAddressLimitPercentin interfaceAddressControl- Returns:
- the % of memory limit that is currently in use
-
block
public boolean block()Description copied from interface:AddressControlBlocks message production to this address by limiting credit- Specified by:
blockin interfaceAddressControl- Returns:
trueif production is blocked
-
unblock
public void unblock()- Specified by:
unblockin interfaceAddressControl
-
getNumberOfPages
public long getNumberOfPages()Description copied from interface:AddressControlReturns the number of pages used by this address.- Specified by:
getNumberOfPagesin interfaceAddressControl- Returns:
- the number of pages used by this address
-
getMessageCount
public long getMessageCount()Description copied from interface:AddressControlReturns number of messages currently in all queues bound to this address (includes scheduled, paged, and in-delivery messages).- Specified by:
getMessageCountin interfaceAddressControl- Returns:
- number of messages currently in all queues bound to this address (includes scheduled, paged, and in-delivery messages)
-
getQueueCount
public long getQueueCount()Description copied from interface:AddressControlReturns number of local queues bound to this address.- Specified by:
getQueueCountin interfaceAddressControl- Returns:
- number of local queues bound to this address
-
getRoutedMessageCount
public long getRoutedMessageCount()Description copied from interface:AddressControlReturns the number of messages routed to one or more bindings.- Specified by:
getRoutedMessageCountin interfaceAddressControl- Returns:
- the number of messages routed to one or more bindings
-
getUnRoutedMessageCount
public long getUnRoutedMessageCount()Description copied from interface:AddressControlReturns the number of messages not routed to any bindings.- Specified by:
getUnRoutedMessageCountin interfaceAddressControl- Returns:
- the number of messages not routed to any bindings
-
sendMessage
public String sendMessage(Map<String, String> headers, int type, String body, boolean durable, String user, String password) throws ExceptionDescription copied from interface:AddressControlSends a TextMessage to a password-protected address.- Specified by:
sendMessagein interfaceAddressControl- 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
public String sendMessage(Map<String, String> headers, int type, String body, boolean durable, String user, String password, boolean createMessageId) throws ExceptionDescription copied from interface:AddressControlSends a TextMessage to a password-protected address.- Specified by:
sendMessagein interfaceAddressControl- 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
-
fillMBeanOperationInfo
- Specified by:
fillMBeanOperationInfoin classAbstractControl
-
fillMBeanAttributeInfo
- Specified by:
fillMBeanAttributeInfoin classAbstractControl
-
pause
public void pause()Description copied from interface:AddressControlPauses 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.- Specified by:
pausein interfaceAddressControl
-
pause
public void pause(boolean persist) Description copied from interface:AddressControlPauses 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.- Specified by:
pausein interfaceAddressControl- Parameters:
persist- iftrue, the pause state will be persisted.
-
resume
public void resume()Description copied from interface:AddressControlResume all the queues bound of this address. Messages are delivered again to all its bounded queues.- Specified by:
resumein interfaceAddressControl
-
isPaused
public boolean isPaused()- Specified by:
isPausedin interfaceAddressControl
-
isRetroactiveResource
public boolean isRetroactiveResource()- Specified by:
isRetroactiveResourcein interfaceAddressControl
-
getCurrentDuplicateIdCacheSize
public long getCurrentDuplicateIdCacheSize()- Specified by:
getCurrentDuplicateIdCacheSizein interfaceAddressControl
-
clearDuplicateIdCache
public boolean clearDuplicateIdCache()- Specified by:
clearDuplicateIdCachein interfaceAddressControl
-
isAutoCreated
public boolean isAutoCreated()Description copied from interface:AddressControlReturns whether this address was created automatically in response to client action.- Specified by:
isAutoCreatedin interfaceAddressControl- Returns:
- whether this address was created automatically in response to client action
-
isInternal
public boolean isInternal()Description copied from interface:AddressControlReturns whether this address was created for the broker's internal use.- Specified by:
isInternalin interfaceAddressControl- Returns:
- whether this address was created for the broker's internal use
-
isTemporary
public boolean isTemporary()Description copied from interface:AddressControlReturns whether this address is temporary.- Specified by:
isTemporaryin interfaceAddressControl- Returns:
- whether this address is temporary
-
purge
Description copied from interface:AddressControlPurge all the queues bound of this address. Returns the total number of messages purged.- Specified by:
purgein interfaceAddressControl- Throws:
Exception
-
replay
- Specified by:
replayin interfaceAddressControl- Throws:
Exception
-
replay
- Specified by:
replayin interfaceAddressControl- Throws:
Exception
-