org.apache.activemq.artemis.jms.management.impl

## Class JMSServerControlImpl

- java.lang.Object
- - javax.management.StandardMBean
  - - org.apache.activemq.artemis.core.management.impl.AbstractControl
    - - org.apache.activemq.artemis.jms.management.impl.JMSServerControlImpl

- All Implemented Interfaces:
    DynamicMBean, MBeanRegistration, NotificationBroadcaster, NotificationEmitter, JMSServerControl, org.apache.activemq.artemis.core.server.management.NotificationListener

      public class JMSServerControlImpl
      extends org.apache.activemq.artemis.core.management.impl.AbstractControl
      implements JMSServerControl, NotificationEmitter, org.apache.activemq.artemis.core.server.management.NotificationListener

- - ### Field Summary

    - ### Fields inherited from class org.apache.activemq.artemis.core.management.impl.AbstractControl

      `storageManager`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JMSServerControlImpl(JMSServerManager server)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)`
    `boolean` | `closeConnectionsForAddress(String ipAddress)` Closes all the connections of clients connected to this server which matches the specified IP address.
    `boolean` | `closeConnectionsForUser(String userName)` Closes all the connections on this server for sessions using a particular user name.
    `String` | `closeConnectionWithClientID(String clientID)` List all the prepared transaction, sorted by date, oldest first, with details, in HTML format
    `boolean` | `closeConsumerConnectionsForAddress(String address)` Closes all the connections on this server for consumers which are consuming from a queue associated with a particular address.
    `void` | `createConnectionFactory(String name, boolean ha, boolean useDiscovery, int cfType, String[] connectorNames, Object[] bindings)` See the interface definition for the javadoc.
    `void` | `createConnectionFactory(String name, boolean ha, boolean useDiscovery, int cfType, String[] connectorNames, String[] bindings, String clientID, long clientFailureCheckPeriod, long connectionTTL, long callTimeout, long callFailoverTimeout, int minLargeMessageSize, boolean compressLargeMessages, int consumerWindowSize, int consumerMaxRate, int confirmationWindowSize, int producerWindowSize, int producerMaxRate, boolean blockOnAcknowledge, boolean blockOnDurableSend, boolean blockOnNonDurableSend, boolean autoGroup, boolean preAcknowledge, String loadBalancingPolicyClassName, int transactionBatchSize, int dupsOKBatchSize, boolean useGlobalPools, int scheduledThreadPoolMaxSize, int threadPoolMaxSize, long retryInterval, double retryIntervalMultiplier, long maxRetryInterval, int reconnectAttempts, boolean failoverOnInitialConnection, String groupId)`
    `void` | `createConnectionFactory(String name, boolean ha, boolean useDiscovery, int cfType, String connectors, String bindings)` Create a JMS ConnectionFactory with the specified name connected to a single live-backup pair of servers.
    `void` | `createConnectionFactory(String name, boolean ha, boolean useDiscovery, int cfType, String connectors, String bindings, String clientID, long clientFailureCheckPeriod, long connectionTTL, long callTimeout, long callFailoverTimeout, int minLargeMessageSize, boolean compressLargeMessages, int consumerWindowSize, int consumerMaxRate, int confirmationWindowSize, int producerWindowSize, int producerMaxRate, boolean blockOnAcknowledge, boolean blockOnDurableSend, boolean blockOnNonDurableSend, boolean autoGroup, boolean preAcknowledge, String loadBalancingPolicyClassName, int transactionBatchSize, int dupsOKBatchSize, boolean useGlobalPools, int scheduledThreadPoolMaxSize, int threadPoolMaxSize, long retryInterval, double retryIntervalMultiplier, long maxRetryInterval, int reconnectAttempts, boolean failoverOnInitialConnection, String groupId)`
    `boolean` | `createQueue(String name)` Creates a durable JMS Queue.
    `boolean` | `createQueue(String name, String bindings)` Creates a durable JMS Queue with the specified name and JNDI binding.
    `boolean` | `createQueue(String name, String bindings, String selector)` Creates a durable JMS Queue with the specified name, JNDI binding and selector.
    `boolean` | `createQueue(String name, String bindings, String selector, boolean durable)` Creates a JMS Queue with the specified name, durability, selector and JNDI binding.
    `boolean` | `createTopic(String name)` Creates a JMS Topic.
    `boolean` | `createTopic(String topicName, String bindings)` Creates a JMS Topic with the specified name and JNDI binding.
    `void` | `destroyConnectionFactory(String name)`
    `boolean` | `destroyQueue(String name)` Destroys a JMS Queue with the specified name.
    `boolean` | `destroyQueue(String name, boolean removeConsumers)` Destroys a JMS Queue with the specified name.
    `boolean` | `destroyTopic(String name)` Destroys a JMS Topic with the specified name.
    `boolean` | `destroyTopic(String name, boolean removeConsumers)` Destroys a JMS Topic with the specified name.
    `protected MBeanOperationInfo[]` | `fillMBeanOperationInfo()`
    `String[]` | `getConnectionFactoryNames()` Returns the names of the JMS connection factories available on this server.
    `String` | `getLastSentMessageID(String sessionID, String address)` Returns the last sent message's ID from the given session to an address.
    `MBeanNotificationInfo[]` | `getNotificationInfo()`
    `static MBeanNotificationInfo[]` | `getNotificationInfos()`
    `String[]` | `getQueueNames()` Returns the names of the JMS queues available on this server.
    `String` | `getSessionCreationTime(String sessionID)` Gets the session's creation time.
    `String[]` | `getTopicNames()` Returns the names of the JMS topics available on this server.
    `String` | `getVersion()` Returns this server's version
    `boolean` | `isStarted()` Returns whether this server is started.
    `String` | `listAllConsumersAsJSON()` Lists all the consumers The returned String is a JSON string containing an array of JMSConsumerInfo objects.
    `String[]` | `listConnectionIDs()` Lists all the IDs of the connections connected to this server.
    `String` | `listConnectionsAsJSON()` Lists all the connections connected to this server.
    `String` | `listConsumersAsJSON(String connectionID)` Lists all the consumers which belongs to the JMS Connection specified by the connectionID.
    `String` | `listPreparedTransactionDetailsAsHTML()` List all the prepared transaction, sorted by date, oldest first, with details, in HTML format
    `String` | `listPreparedTransactionDetailsAsJSON()` List all the prepared transaction, sorted by date, oldest first, with details, in text format
    `String[]` | `listRemoteAddresses()` Lists the addresses of all the clients connected to this address.
    `String[]` | `listRemoteAddresses(String ipAddress)` Lists the addresses of the clients connected to this address which matches the specified IP address.
    `String[]` | `listSessions(String connectionID)` Lists all the sessions IDs for the specified connection ID.
    `String` | `listSessionsAsJSON(String connectionID)` Lists all the sessions IDs for the specified connection ID.
    `String[]` | `listTargetDestinations(String sessionID)` Lists all addresses to which the designated server session has sent messages.
    `void` | `onNotification(org.apache.activemq.artemis.core.server.management.Notification notification)`
    `void` | `removeNotificationListener(NotificationListener listener)`
    `void` | `removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)`

    - ### Methods inherited from class org.apache.activemq.artemis.core.management.impl.AbstractControl

      `blockOnIO, clearIO, getMBeanInfo`

    - ### Methods 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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JMSServerControlImpl

          public JMSServerControlImpl(JMSServerManager server)
                               throws Exception

      Throws:
        `Exception`

  - ### Method Detail

    - #### getNotificationInfos

          public static MBeanNotificationInfo[] getNotificationInfos()

    - #### createConnectionFactory

          public void createConnectionFactory(String name,
                                              boolean ha,
                                              boolean useDiscovery,
                                              int cfType,
                                              String[] connectorNames,
                                              Object[] bindings)
                                       throws Exception

      See the interface definition for the javadoc.
      Specified by:
        `createConnectionFactory` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### createConnectionFactory

          public void createConnectionFactory(String name,
                                              boolean ha,
                                              boolean useDiscovery,
                                              int cfType,
                                              String connectors,
                                              String bindings,
                                              String clientID,
                                              long clientFailureCheckPeriod,
                                              long connectionTTL,
                                              long callTimeout,
                                              long callFailoverTimeout,
                                              int minLargeMessageSize,
                                              boolean compressLargeMessages,
                                              int consumerWindowSize,
                                              int consumerMaxRate,
                                              int confirmationWindowSize,
                                              int producerWindowSize,
                                              int producerMaxRate,
                                              boolean blockOnAcknowledge,
                                              boolean blockOnDurableSend,
                                              boolean blockOnNonDurableSend,
                                              boolean autoGroup,
                                              boolean preAcknowledge,
                                              String loadBalancingPolicyClassName,
                                              int transactionBatchSize,
                                              int dupsOKBatchSize,
                                              boolean useGlobalPools,
                                              int scheduledThreadPoolMaxSize,
                                              int threadPoolMaxSize,
                                              long retryInterval,
                                              double retryIntervalMultiplier,
                                              long maxRetryInterval,
                                              int reconnectAttempts,
                                              boolean failoverOnInitialConnection,
                                              String groupId)
                                       throws Exception

      Specified by:
        `createConnectionFactory` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### createConnectionFactory

          public void createConnectionFactory(String name,
                                              boolean ha,
                                              boolean useDiscovery,
                                              int cfType,
                                              String[] connectorNames,
                                              String[] bindings,
                                              String clientID,
                                              long clientFailureCheckPeriod,
                                              long connectionTTL,
                                              long callTimeout,
                                              long callFailoverTimeout,
                                              int minLargeMessageSize,
                                              boolean compressLargeMessages,
                                              int consumerWindowSize,
                                              int consumerMaxRate,
                                              int confirmationWindowSize,
                                              int producerWindowSize,
                                              int producerMaxRate,
                                              boolean blockOnAcknowledge,
                                              boolean blockOnDurableSend,
                                              boolean blockOnNonDurableSend,
                                              boolean autoGroup,
                                              boolean preAcknowledge,
                                              String loadBalancingPolicyClassName,
                                              int transactionBatchSize,
                                              int dupsOKBatchSize,
                                              boolean useGlobalPools,
                                              int scheduledThreadPoolMaxSize,
                                              int threadPoolMaxSize,
                                              long retryInterval,
                                              double retryIntervalMultiplier,
                                              long maxRetryInterval,
                                              int reconnectAttempts,
                                              boolean failoverOnInitialConnection,
                                              String groupId)
                                       throws Exception

      Specified by:
        `createConnectionFactory` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### createConnectionFactory

          public void createConnectionFactory(String name,
                                              boolean ha,
                                              boolean useDiscovery,
                                              int cfType,
                                              String connectors,
                                              String bindings)
                                       throws Exception

      Create a JMS ConnectionFactory with the specified name connected to a single live-backup pair of servers.
      The ConnectionFactory is bound to the Registry for all the specified bindings Strings.
      Specified by:
        `createConnectionFactory` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### createQueue

          public boolean createQueue(String name)
                              throws Exception

      Description copied from interface: `JMSServerControl`
      Creates a durable JMS Queue.
      Specified by:
        `createQueue` in interface `JMSServerControl`
      Returns:
        `true` if the queue was created, `false` else
      Throws:
        `Exception`

    - #### createQueue

          public boolean createQueue(String name,
                                     String bindings)
                              throws Exception

      Description copied from interface: `JMSServerControl`
      Creates a durable JMS Queue with the specified name and JNDI binding.
      Specified by:
        `createQueue` in interface `JMSServerControl`
      Returns:
        `true` if the queue was created, `false` else
      Throws:
        `Exception`

    - #### createQueue

          public boolean createQueue(String name,
                                     String bindings,
                                     String selector)
                              throws Exception

      Description copied from interface: `JMSServerControl`
      Creates a durable JMS Queue with the specified name, JNDI binding and selector.
      Specified by:
        `createQueue` in interface `JMSServerControl`
      Returns:
        `true` if the queue was created, `false` else
      Throws:
        `Exception`

    - #### createQueue

          public boolean createQueue(String name,
                                     String bindings,
                                     String selector,
                                     boolean durable)
                              throws Exception

      Description copied from interface: `JMSServerControl`
      Creates a JMS Queue with the specified name, durability, selector and JNDI binding.
      Specified by:
        `createQueue` in interface `JMSServerControl`
      Returns:
        `true` if the queue was created, `false` else
      Throws:
        `Exception`

    - #### destroyQueue

          public boolean destroyQueue(String name)
                               throws Exception

      Description copied from interface: `JMSServerControl`
      Destroys a JMS Queue with the specified name.
      Specified by:
        `destroyQueue` in interface `JMSServerControl`
      Returns:
        `true` if the queue was destroyed, `false` else
      Throws:
        `Exception`

    - #### destroyQueue

          public boolean destroyQueue(String name,
                                      boolean removeConsumers)
                               throws Exception

      Description copied from interface: `JMSServerControl`
      Destroys a JMS Queue with the specified name.
      Specified by:
        `destroyQueue` in interface `JMSServerControl`
      Returns:
        `true` if the queue was destroyed, `false` else
      Throws:
        `Exception`

    - #### createTopic

          public boolean createTopic(String name)
                              throws Exception

      Description copied from interface: `JMSServerControl`
      Creates a JMS Topic.
      Specified by:
        `createTopic` in interface `JMSServerControl`
      Returns:
        `true` if the topic was created, `false` else
      Throws:
        `Exception`

    - #### createTopic

          public boolean createTopic(String topicName,
                                     String bindings)
                              throws Exception

      Description copied from interface: `JMSServerControl`
      Creates a JMS Topic with the specified name and JNDI binding.
      Specified by:
        `createTopic` in interface `JMSServerControl`
      Returns:
        `true` if the topic was created, `false` else
      Throws:
        `Exception`

    - #### destroyTopic

          public boolean destroyTopic(String name)
                               throws Exception

      Description copied from interface: `JMSServerControl`
      Destroys a JMS Topic with the specified name.
      Specified by:
        `destroyTopic` in interface `JMSServerControl`
      Returns:
        `true` if the topic was destroyed, `false` else
      Throws:
        `Exception`

    - #### destroyTopic

          public boolean destroyTopic(String name,
                                      boolean removeConsumers)
                               throws Exception

      Description copied from interface: `JMSServerControl`
      Destroys a JMS Topic with the specified name.
      Specified by:
        `destroyTopic` in interface `JMSServerControl`
      Returns:
        `true` if the topic was destroyed, `false` else
      Throws:
        `Exception`

    - #### destroyConnectionFactory

          public void destroyConnectionFactory(String name)
                                        throws Exception

      Specified by:
        `destroyConnectionFactory` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### isStarted

          public boolean isStarted()

      Description copied from interface: `JMSServerControl`
      Returns whether this server is started.
      Specified by:
        `isStarted` in interface `JMSServerControl`

    - #### getVersion

          public String getVersion()

      Description copied from interface: `JMSServerControl`
      Returns this server's version
      Specified by:
        `getVersion` in interface `JMSServerControl`

    - #### getQueueNames

          public String[] getQueueNames()

      Description copied from interface: `JMSServerControl`
      Returns the names of the JMS queues available on this server.
      Specified by:
        `getQueueNames` in interface `JMSServerControl`

    - #### getTopicNames

          public String[] getTopicNames()

      Description copied from interface: `JMSServerControl`
      Returns the names of the JMS topics available on this server.
      Specified by:
        `getTopicNames` in interface `JMSServerControl`

    - #### getConnectionFactoryNames

          public String[] getConnectionFactoryNames()

      Description copied from interface: `JMSServerControl`
      Returns the names of the JMS connection factories available on this server.
      Specified by:
        `getConnectionFactoryNames` in interface `JMSServerControl`

    - #### removeNotificationListener

          public void removeNotificationListener(NotificationListener listener,
                                                 NotificationFilter filter,
                                                 Object handback)
                                          throws ListenerNotFoundException

      Specified by:
        `removeNotificationListener` in interface `NotificationEmitter`
      Throws:
        `ListenerNotFoundException`

    - #### removeNotificationListener

          public void removeNotificationListener(NotificationListener listener)
                                          throws ListenerNotFoundException

      Specified by:
        `removeNotificationListener` in interface `NotificationBroadcaster`
      Throws:
        `ListenerNotFoundException`

    - #### addNotificationListener

          public void addNotificationListener(NotificationListener listener,
                                              NotificationFilter filter,
                                              Object handback)
                                       throws IllegalArgumentException

      Specified by:
        `addNotificationListener` in interface `NotificationBroadcaster`
      Throws:
        `IllegalArgumentException`

    - #### getNotificationInfo

          public MBeanNotificationInfo[] getNotificationInfo()

      Specified by:
        `getNotificationInfo` in interface `NotificationBroadcaster`

    - #### listRemoteAddresses

          public String[] listRemoteAddresses()
                                       throws Exception

      Description copied from interface: `JMSServerControl`
      Lists the addresses of all the clients connected to this address.
      Specified by:
        `listRemoteAddresses` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### listRemoteAddresses

          public String[] listRemoteAddresses(String ipAddress)
                                       throws Exception

      Description copied from interface: `JMSServerControl`
      Lists the addresses of the clients connected to this address which matches the specified IP address.
      Specified by:
        `listRemoteAddresses` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### closeConnectionsForAddress

          public boolean closeConnectionsForAddress(String ipAddress)
                                             throws Exception

      Description copied from interface: `JMSServerControl`
      Closes all the connections of clients connected to this server which matches the specified IP address.
      Specified by:
        `closeConnectionsForAddress` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### closeConsumerConnectionsForAddress

          public boolean closeConsumerConnectionsForAddress(String address)
                                                     throws Exception

      Description copied from interface: `JMSServerControl`
      Closes all the connections on this server for consumers which are consuming from a queue associated with a particular address.
      Specified by:
        `closeConsumerConnectionsForAddress` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### closeConnectionsForUser

          public boolean closeConnectionsForUser(String userName)
                                          throws Exception

      Description copied from interface: `JMSServerControl`
      Closes all the connections on this server for sessions using a particular user name.
      Specified by:
        `closeConnectionsForUser` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### listConnectionIDs

          public String[] listConnectionIDs()
                                     throws Exception

      Description copied from interface: `JMSServerControl`
      Lists all the IDs of the connections connected to this server.
      Specified by:
        `listConnectionIDs` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### listConnectionsAsJSON

          public String listConnectionsAsJSON()
                                       throws Exception

      Description copied from interface: `JMSServerControl`
      Lists all the connections connected to this server. The returned String is a JSON string containing an array of JMSConnectionInfo objects.
      Specified by:
        `listConnectionsAsJSON` in interface `JMSServerControl`
      Throws:
        `Exception`
      See Also:
        `JMSConnectionInfo.from(String)`

    - #### listConsumersAsJSON

          public String listConsumersAsJSON(String connectionID)
                                     throws Exception

      Description copied from interface: `JMSServerControl`
      Lists all the consumers which belongs to the JMS Connection specified by the connectionID. The returned String is a JSON string containing an array of JMSConsumerInfo objects.
      Specified by:
        `listConsumersAsJSON` in interface `JMSServerControl`
      Throws:
        `Exception`
      See Also:
        `JMSConsumerInfo.from(String)`

    - #### listAllConsumersAsJSON

          public String listAllConsumersAsJSON()
                                        throws Exception

      Description copied from interface: `JMSServerControl`
      Lists all the consumers The returned String is a JSON string containing an array of JMSConsumerInfo objects.
      Specified by:
        `listAllConsumersAsJSON` in interface `JMSServerControl`
      Throws:
        `Exception`
      See Also:
        `JMSConsumerInfo.from(String)`

    - #### listSessions

          public String[] listSessions(String connectionID)
                                throws Exception

      Description copied from interface: `JMSServerControl`
      Lists all the sessions IDs for the specified connection ID.
      Specified by:
        `listSessions` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### listPreparedTransactionDetailsAsJSON

          public String listPreparedTransactionDetailsAsJSON()
                                                      throws Exception

      Description copied from interface: `JMSServerControl`
      List all the prepared transaction, sorted by date, oldest first, with details, in text format
      Specified by:
        `listPreparedTransactionDetailsAsJSON` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### listPreparedTransactionDetailsAsHTML

          public String listPreparedTransactionDetailsAsHTML()
                                                      throws Exception

      Description copied from interface: `JMSServerControl`
      List all the prepared transaction, sorted by date, oldest first, with details, in HTML format
      Specified by:
        `listPreparedTransactionDetailsAsHTML` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### fillMBeanOperationInfo

          protected MBeanOperationInfo[] fillMBeanOperationInfo()

      Specified by:
        `fillMBeanOperationInfo` in class `org.apache.activemq.artemis.core.management.impl.AbstractControl`

    - #### listTargetDestinations

          public String[] listTargetDestinations(String sessionID)
                                          throws Exception

      Description copied from interface: `JMSServerControl`
      Lists all addresses to which the designated server session has sent messages.
      Specified by:
        `listTargetDestinations` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### getLastSentMessageID

          public String getLastSentMessageID(String sessionID,
                                             String address)
                                      throws Exception

      Description copied from interface: `JMSServerControl`
      Returns the last sent message's ID from the given session to an address.
      Specified by:
        `getLastSentMessageID` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### getSessionCreationTime

          public String getSessionCreationTime(String sessionID)
                                        throws Exception

      Description copied from interface: `JMSServerControl`
      Gets the session's creation time.
      Specified by:
        `getSessionCreationTime` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### listSessionsAsJSON

          public String listSessionsAsJSON(String connectionID)
                                    throws Exception

      Description copied from interface: `JMSServerControl`
      Lists all the sessions IDs for the specified connection ID.
      Specified by:
        `listSessionsAsJSON` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### closeConnectionWithClientID

          public String closeConnectionWithClientID(String clientID)
                                             throws Exception

      Description copied from interface: `JMSServerControl`
      List all the prepared transaction, sorted by date, oldest first, with details, in HTML format
      Specified by:
        `closeConnectionWithClientID` in interface `JMSServerControl`
      Throws:
        `Exception`

    - #### onNotification

          public void onNotification(org.apache.activemq.artemis.core.server.management.Notification notification)

      Specified by:
        `onNotification` in interface `org.apache.activemq.artemis.core.server.management.NotificationListener`

Copyright © 2017. All rights reserved.