Class AddressControlImpl

All Implemented Interfaces:
DynamicMBean, MBeanRegistration, AddressControl

public class AddressControlImpl extends AbstractControl implements AddressControl
  • Constructor Details

  • Method Details

    • getId

      public long getId()
      Description copied from interface: AddressControl
      Returns the internal ID of this address.
      Specified by:
      getId in interface AddressControl
      Returns:
      the internal ID of this address
    • getAddress

      public String getAddress()
      Description copied from interface: AddressControl
      Returns the name of this address.
      Specified by:
      getAddress in interface AddressControl
      Returns:
      the name of this address
    • getRoutingTypes

      public String[] getRoutingTypes()
      Description copied from interface: AddressControl
      Returns the routing types enabled on this address.
      Specified by:
      getRoutingTypes in interface AddressControl
      Returns:
      the routing types enabled on this address
    • getRoutingTypesAsJSON

      public String getRoutingTypesAsJSON()
      Description copied from interface: AddressControl
      Returns the routing types enabled on this address as JSON.
      Specified by:
      getRoutingTypesAsJSON in interface AddressControl
      Returns:
      the routing types enabled on this address as JSON
    • getRemoteQueueNames

      public String[] getRemoteQueueNames()
      Description copied from interface: AddressControl
      Returns the names of the remote queue(s) bound to this address.
      Specified by:
      getRemoteQueueNames in interface AddressControl
      Returns:
      the names of the remote queue(s) bound to this address
    • getQueueNames

      public String[] getQueueNames()
      Description copied from interface: AddressControl
      Returns the names of the local queue(s) bound to this address.
      Specified by:
      getQueueNames in interface AddressControl
      Returns:
      the names of the local queue(s) bound to this address
    • getAllQueueNames

      public String[] getAllQueueNames()
      Description copied from interface: AddressControl
      Returns the names of both the local and remote queue(s) bound to this address.
      Specified by:
      getAllQueueNames in interface AddressControl
      Returns:
      the names of both the local and remote queue(s) bound to this address
    • getBindingNames

      public String[] getBindingNames() throws Exception
      Description copied from interface: AddressControl
      Returns the names of all bindings (both queues and diverts) bound to this address.
      Specified by:
      getBindingNames in interface AddressControl
      Returns:
      the names of all bindings (both queues and diverts) bound to this address
      Throws:
      Exception
    • getRoles

      public Object[] getRoles() throws Exception
      Description copied from interface: AddressControl
      Returns the roles (name and permissions) associated with this address.
      Specified by:
      getRoles in interface AddressControl
      Returns:
      the roles (name and permissions) associated with this address
      Throws:
      Exception
    • getRolesAsJSON

      public String getRolesAsJSON() throws Exception
      Description copied from interface: AddressControl
      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)..

      Specified by:
      getRolesAsJSON in interface AddressControl
      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

      public long getNumberOfBytesPerPage() throws Exception
      Description copied from interface: AddressControl
      Returns the number of bytes used by each page for this address.
      Specified by:
      getNumberOfBytesPerPage in interface AddressControl
      Returns:
      the number of bytes used by each page for this address
      Throws:
      Exception
    • getAddressSize

      public long getAddressSize()
      Description copied from interface: AddressControl
      Returns the number of estimated bytes being used by all the queue(s) bound to this address; used to control paging and blocking.
      Specified by:
      getAddressSize in interface AddressControl
      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: AddressControl
      Returns the maximum number of bytes that can be read into memory from paged files.
      Specified by:
      getMaxPageReadBytes in interface AddressControl
      Returns:
      the maximum number of bytes that can be read into memory from paged files
    • getMaxPageReadMessages

      public int getMaxPageReadMessages()
      Description copied from interface: AddressControl
      Returns the maximum number of messages that can be read into memory from paged files.
      Specified by:
      getMaxPageReadMessages in interface AddressControl
      Returns:
      the maximum number of messages that can be read into memory from paged files
    • getPrefetchPageBytes

      public int getPrefetchPageBytes()
      Description copied from interface: AddressControl
      Returns the number of bytes to prefetch from storage into memory before reching maxReadBytes.
      Specified by:
      getPrefetchPageBytes in interface AddressControl
      Returns:
      the number of bytes to prefetch from storage into memory before reching maxReadBytes
    • getPrefetchPageMessages

      public int getPrefetchPageMessages()
      Description copied from interface: AddressControl
      Returns the number of messages prefetch from storage into memory before reching maxReadBytes.
      Specified by:
      getPrefetchPageMessages in interface AddressControl
      Returns:
      the number of messages prefetch from storage into memory before reching maxReadBytes
    • schedulePageCleanup

      public void schedulePageCleanup() throws Exception
      Specified by:
      schedulePageCleanup in interface AddressControl
      Throws:
      Exception
    • getNumberOfMessages

      @Deprecated public long getNumberOfMessages()
      Deprecated.
      Description copied from interface: AddressControl
      Returns the sum of messages on queue(s), including messages in delivery.
      Specified by:
      getNumberOfMessages in interface AddressControl
      Returns:
      the sum of messages on queue(s), including messages in delivery
    • isPaging

      public boolean isPaging() throws Exception
      Description copied from interface: AddressControl
      Returns whether this address is paging.
      Specified by:
      isPaging in interface AddressControl
      Returns:
      whether this address is paging
      Throws:
      Exception
    • getAddressLimitPercent

      public int getAddressLimitPercent()
      Description copied from interface: AddressControl
      Returns the % of memory limit that is currently in use.
      Specified by:
      getAddressLimitPercent in interface AddressControl
      Returns:
      the % of memory limit that is currently in use
    • block

      public boolean block()
      Description copied from interface: AddressControl
      Blocks message production to this address by limiting credit
      Specified by:
      block in interface AddressControl
      Returns:
      true if production is blocked
    • unblock

      public void unblock()
      Specified by:
      unblock in interface AddressControl
    • getNumberOfPages

      public long getNumberOfPages()
      Description copied from interface: AddressControl
      Returns the number of pages used by this address.
      Specified by:
      getNumberOfPages in interface AddressControl
      Returns:
      the number of pages used by this address
    • getMessageCount

      public long getMessageCount()
      Description copied from interface: AddressControl
      Returns number of messages currently in all queues bound to this address (includes scheduled, paged, and in-delivery messages).
      Specified by:
      getMessageCount in interface AddressControl
      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: AddressControl
      Returns number of local queues bound to this address.
      Specified by:
      getQueueCount in interface AddressControl
      Returns:
      number of local queues bound to this address
    • getRoutedMessageCount

      public long getRoutedMessageCount()
      Description copied from interface: AddressControl
      Returns the number of messages routed to one or more bindings.
      Specified by:
      getRoutedMessageCount in interface AddressControl
      Returns:
      the number of messages routed to one or more bindings
    • getUnRoutedMessageCount

      public long getUnRoutedMessageCount()
      Description copied from interface: AddressControl
      Returns the number of messages not routed to any bindings.
      Specified by:
      getUnRoutedMessageCount in interface AddressControl
      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 Exception
      Description copied from interface: AddressControl
      Sends a TextMessage to a password-protected address.
      Specified by:
      sendMessage in interface AddressControl
      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 Exception
      Description copied from interface: AddressControl
      Sends a TextMessage to a password-protected address.
      Specified by:
      sendMessage in interface AddressControl
      Parameters:
      headers - the message headers and properties to set. Can only container Strings maped to primitive types.
      body - the text to send
      createMessageId - whether to auto generate a Message ID
      Throws:
      Exception
    • fillMBeanOperationInfo

      protected MBeanOperationInfo[] fillMBeanOperationInfo()
      Specified by:
      fillMBeanOperationInfo in class AbstractControl
    • fillMBeanAttributeInfo

      protected MBeanAttributeInfo[] fillMBeanAttributeInfo()
      Specified by:
      fillMBeanAttributeInfo in class AbstractControl
    • pause

      public void pause()
      Description copied from interface: AddressControl
      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.
      Specified by:
      pause in interface AddressControl
    • pause

      public void pause(boolean persist)
      Description copied from interface: AddressControl
      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.
      Specified by:
      pause in interface AddressControl
      Parameters:
      persist - if true, the pause state will be persisted.
    • resume

      public void resume()
      Description copied from interface: AddressControl
      Resume all the queues bound of this address. Messages are delivered again to all its bounded queues.
      Specified by:
      resume in interface AddressControl
    • isPaused

      public boolean isPaused()
      Specified by:
      isPaused in interface AddressControl
    • isRetroactiveResource

      public boolean isRetroactiveResource()
      Specified by:
      isRetroactiveResource in interface AddressControl
    • getCurrentDuplicateIdCacheSize

      public long getCurrentDuplicateIdCacheSize()
      Specified by:
      getCurrentDuplicateIdCacheSize in interface AddressControl
    • clearDuplicateIdCache

      public boolean clearDuplicateIdCache()
      Specified by:
      clearDuplicateIdCache in interface AddressControl
    • isAutoCreated

      public boolean isAutoCreated()
      Description copied from interface: AddressControl
      Returns whether this address was created automatically in response to client action.
      Specified by:
      isAutoCreated in interface AddressControl
      Returns:
      whether this address was created automatically in response to client action
    • isInternal

      public boolean isInternal()
      Description copied from interface: AddressControl
      Returns whether this address was created for the broker's internal use.
      Specified by:
      isInternal in interface AddressControl
      Returns:
      whether this address was created for the broker's internal use
    • isTemporary

      public boolean isTemporary()
      Description copied from interface: AddressControl
      Returns whether this address is temporary.
      Specified by:
      isTemporary in interface AddressControl
      Returns:
      whether this address is temporary
    • purge

      public long purge() throws Exception
      Description copied from interface: AddressControl
      Purge all the queues bound of this address. Returns the total number of messages purged.
      Specified by:
      purge in interface AddressControl
      Throws:
      Exception
    • replay

      public void replay(String target, String filter) throws Exception
      Specified by:
      replay in interface AddressControl
      Throws:
      Exception
    • replay

      public void replay(String startScan, String endScan, String target, String filter) throws Exception
      Specified by:
      replay in interface AddressControl
      Throws:
      Exception