org.apache.activemq.artemis.api.core.management

## Interface AddressControl

-     public interface AddressControl

  An AddressControl is used to manage an address.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ADDRESS_SIZE_DESCRIPTION`
    `static String` | `NUMBER_OF_PAGES_DESCRIPTION`
    `static String` | `ROUTED_MESSAGE_COUNT_DESCRIPTION`
    `static String` | `UNROUTED_MESSAGE_COUNT_DESCRIPTION`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `clearDuplicateIdCache()`
    `String` | `getAddress()` Returns the managed address.
    `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.
    `String[]` | `getAllQueueNames()` Returns the names of both the local and remote queue(s) bound to this address.
    `String[]` | `getBindingNames()` Returns the names of all bindings (both queues and diverts) bound to this address
    `long` | `getCurrentDuplicateIdCacheSize()`
    `long` | `getMessageCount()`
    `long` | `getNumberOfBytesPerPage()` Returns the number of bytes used by each page for this address.
    `long` | `getNumberOfMessages()` Returns the sum of messages on queue(s), including messages in delivery.
    `int` | `getNumberOfPages()` Returns the number of pages used by this address.
    `String[]` | `getQueueNames()` Returns the names of the local queue(s) bound to this address.
    `String[]` | `getRemoteQueueNames()` Returns the names of the remote queue(s) bound to this address.
    `Object[]` | `getRoles()` Returns the roles (name and permissions) associated with this address.
    `String` | `getRolesAsJSON()` Returns the roles (name and permissions) associated with this address using JSON serialization.
    `long` | `getRoutedMessageCount()` Returns the number of messages routed to one or more bindings
    `String[]` | `getRoutingTypes()`
    `String` | `getRoutingTypesAsJSON()`
    `long` | `getUnRoutedMessageCount()` Returns the number of messages not routed to any bindings
    `boolean` | `isAutoCreated()` Returns whether this address was created automatically in response to client action.
    `boolean` | `isInternal()` Returns whether this address was created for the broker's internal use.
    `boolean` | `isPaging()` Returns whether this address is paging.
    `boolean` | `isPaused()`
    `boolean` | `isRetroactiveResource()`
    `boolean` | `isTemporary()` Returns whether this address is temporary.
    `void` | `pause()` Pauses all the queues bound to this address.Messages are no longer delivered to all its bounded queues.
    `void` | `pause(boolean persist)` 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.
    `long` | `purge()` Purge all the queues bound of this address.
    `void` | `resume()` Resume all the queues bound of this address.Messages are delivered again to all its bounded queues.
    `String` | `sendMessage(Map<String,String> headers, int type, String body, boolean durable, String user, String password)`
    `String` | `sendMessage(Map<String,String> headers, int type, String body, boolean durable, String user, String password, boolean createMessageId)`

- - ### Field Detail

    - #### ROUTED_MESSAGE_COUNT_DESCRIPTION

          static final String ROUTED_MESSAGE_COUNT_DESCRIPTION

      See Also:
        Constant Field Values

    - #### UNROUTED_MESSAGE_COUNT_DESCRIPTION

          static final String UNROUTED_MESSAGE_COUNT_DESCRIPTION

      See Also:
        Constant Field Values

    - #### ADDRESS_SIZE_DESCRIPTION

          static final String ADDRESS_SIZE_DESCRIPTION

      See Also:
        Constant Field Values

    - #### NUMBER_OF_PAGES_DESCRIPTION

          static final String NUMBER_OF_PAGES_DESCRIPTION

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getAddress

          String getAddress()

      Returns the managed address.

    - #### getRoutingTypes

          String[] getRoutingTypes()

    - #### getRoutingTypesAsJSON

          String getRoutingTypesAsJSON()
                                throws Exception

      Throws:
        `Exception`

    - #### getRoles

          Object[] getRoles()
                     throws Exception

      Returns the roles (name and permissions) associated with this address.
      Throws:
        `Exception`

    - #### getRolesAsJSON

          String getRolesAsJSON()
                         throws Exception

      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.

    - #### getNumberOfMessages

          long getNumberOfMessages()
                            throws Exception

      Returns the sum of messages on queue(s), including messages in delivery.
      Throws:
        `Exception`

    - #### getRemoteQueueNames

          String[] getRemoteQueueNames()
                                throws Exception

      Returns the names of the remote queue(s) bound to this address.
      Throws:
        `Exception`

    - #### getQueueNames

          String[] getQueueNames()
                          throws Exception

      Returns the names of the local queue(s) bound to this address.
      Throws:
        `Exception`

    - #### getAllQueueNames

          String[] getAllQueueNames()
                             throws Exception

      Returns the names of both the local and remote queue(s) bound to this address.
      Throws:
        `Exception`

    - #### getNumberOfPages

          int getNumberOfPages()

      Returns the number of pages used by this address.

    - #### isPaging

          boolean isPaging()
                    throws Exception

      Returns whether this address is paging.
      Throws:
        `Exception`

    - #### getNumberOfBytesPerPage

          long getNumberOfBytesPerPage()
                                throws Exception

      Returns the number of bytes used by each page for this address.
      Throws:
        `Exception`

    - #### getBindingNames

          String[] getBindingNames()
                            throws Exception

      Returns the names of all bindings (both queues and diverts) bound to this address
      Throws:
        `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

          String sendMessage(Map<String,String> headers,
                             int type,
                             String body,
                             boolean durable,
                             String user,
                             String password)
                      throws Exception

      Parameters:
        `headers` - the message headers and properties to set. Can only container Strings maped to primitive types.
        `body` - the text to send
        `durable` -
        `user` -
        `password` - @return
      Throws:
        `Exception`

    - #### sendMessage

          String sendMessage(Map<String,String> headers,
                             int type,
                             String body,
                             boolean durable,
                             String user,
                             String password,
                             boolean createMessageId)
                      throws Exception

      Parameters:
        `headers` - the message headers and properties to set. Can only container Strings maped to primitive types.
        `body` - the text to send
        `durable` -
        `user` -
        `password` - @return
        `createMessageId` - whether or not to auto generate a Message ID
      Throws:
        `Exception`

    - #### pause

          void pause()
              throws Exception

      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

          void pause(boolean persist)
              throws Exception

      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` - if true, the pause state will be persisted.
      Throws:
        `Exception`

    - #### resume

          void resume()
               throws Exception

      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

          boolean clearDuplicateIdCache()
                                 throws Exception

      Throws:
        `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 Exception

      Purge all the queues bound of this address. Returns the total number of messages purged.
      Throws:
        `Exception`

Copyright © 2021 The Apache Software Foundation. All rights reserved.