Class ActiveMQBrokerImpl

java.lang.Object
org.wildfly.extension.messaging.activemq.ActiveMQBrokerImpl
All Implemented Interfaces:
ActiveMQBroker

public class ActiveMQBrokerImpl extends Object implements ActiveMQBroker
Implementation of the wrapper over ActiveMQServer and ManagementService.
Author:
Emmanuel Hugonnet (c) 2023 Red Hat, Inc.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ActiveMQBrokerImpl(org.apache.activemq.artemis.core.server.ActiveMQServer delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addConnectorConfiguration(String string, org.apache.activemq.artemis.api.core.TransportConfiguration tc)
    Add a connection configuration to the current ActiveMQServer.
    void
    createQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.RoutingType routingType, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.SimpleString filter, boolean durable, boolean temporary)
    Creates a Queue on the underlying ActiveMQServer.
    void
    destroyQueue(org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.core.security.SecurityAuth session, boolean checkConsumerCount)
    Destroys a queue from the underlying ActiveMQServer.
    org.apache.activemq.artemis.api.core.management.ActiveMQServerControl
    Returns the ActiveMQServerControl to manage the underlying ActiveMQServer.
    Returns the JSON description of the address settings of the specified match address.
    To get an untyped access to ActiveMQServer.
    org.apache.activemq.artemis.api.core.SimpleString
     
    getResource(String resourceName)
    Returns the untyped resource with the specified name- null if none exists.
    getResources(Class<?> resourceType)
    Returns an untyped array of the resources of this type - an empty arry if none exists.
    boolean
    hasResource(String resourceName)
    Returns true if the resource exists - false otherwise.
    boolean
    Returns the current state of the server: true - if the server is started and active - false otherwise.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ActiveMQBrokerImpl

      public ActiveMQBrokerImpl(org.apache.activemq.artemis.core.server.ActiveMQServer delegate)
  • Method Details

    • getDelegate

      public Object getDelegate()
      Description copied from interface: ActiveMQBroker
      To get an untyped access to ActiveMQServer.
      Specified by:
      getDelegate in interface ActiveMQBroker
      Returns:
      the underlying ActiveMQServer
    • getNodeID

      public org.apache.activemq.artemis.api.core.SimpleString getNodeID()
      Specified by:
      getNodeID in interface ActiveMQBroker
      Returns:
      the server node id.
    • addConnectorConfiguration

      public void addConnectorConfiguration(String string, org.apache.activemq.artemis.api.core.TransportConfiguration tc)
      Description copied from interface: ActiveMQBroker
      Add a connection configuration to the current ActiveMQServer.
      Specified by:
      addConnectorConfiguration in interface ActiveMQBroker
      Parameters:
      string - : the name of the connector.
      tc - : the trnasport configurartion.
    • createQueue

      public void createQueue(org.apache.activemq.artemis.api.core.SimpleString address, org.apache.activemq.artemis.api.core.RoutingType routingType, org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.api.core.SimpleString filter, boolean durable, boolean temporary) throws Exception
      Description copied from interface: ActiveMQBroker
      Creates a Queue on the underlying ActiveMQServer.
      Specified by:
      createQueue in interface ActiveMQBroker
      Parameters:
      address - : the queue address.
      routingType - : the queue routing type (anycast or mulicast).
      queueName - : the name of the queue.
      filter - : the filter.
      Throws:
      Exception
    • destroyQueue

      public void destroyQueue(org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.core.security.SecurityAuth session, boolean checkConsumerCount) throws Exception
      Description copied from interface: ActiveMQBroker
      Destroys a queue from the underlying ActiveMQServer.
      Specified by:
      destroyQueue in interface ActiveMQBroker
      Throws:
      Exception
    • isActive

      public boolean isActive()
      Description copied from interface: ActiveMQBroker
      Returns the current state of the server: true - if the server is started and active - false otherwise.
      Specified by:
      isActive in interface ActiveMQBroker
      Returns:
      the current state of the server: true - if the server is started and active - false otherwise.
    • hasResource

      public boolean hasResource(String resourceName)
      Description copied from interface: ActiveMQBroker
      Returns true if the resource exists - false otherwise.
      Specified by:
      hasResource in interface ActiveMQBroker
      Parameters:
      resourceName - : the name of the reosurce.
      Returns:
      true if the resource exists - false otherwise.
    • getResource

      public Object getResource(String resourceName)
      Description copied from interface: ActiveMQBroker
      Returns the untyped resource with the specified name- null if none exists.
      Specified by:
      getResource in interface ActiveMQBroker
      Parameters:
      resourceName - : the name of the resource.
      Returns:
      the untyped resource with the specified name- null if none exists.
    • getResources

      public Object[] getResources(Class<?> resourceType)
      Description copied from interface: ActiveMQBroker
      Returns an untyped array of the resources of this type - an empty arry if none exists.
      Specified by:
      getResources in interface ActiveMQBroker
      Parameters:
      resourceType - : the type of resources.
      Returns:
      an untyped array of the resources of this type - an empty arry if none exists.
    • getActiveMQServerControl

      public org.apache.activemq.artemis.api.core.management.ActiveMQServerControl getActiveMQServerControl()
      Description copied from interface: ActiveMQBroker
      Returns the ActiveMQServerControl to manage the underlying ActiveMQServer.
      Specified by:
      getActiveMQServerControl in interface ActiveMQBroker
      Returns:
      the ActiveMQServerControl
    • getAddressSettingsAsJSON

      public String getAddressSettingsAsJSON(String addressMatch)
      Description copied from interface: ActiveMQBroker
      Returns the JSON description of the address settings of the specified match address.
      Specified by:
      getAddressSettingsAsJSON in interface ActiveMQBroker
      Parameters:
      addressMatch - the address settings match address.
      Returns:
      the JSON description of the address settings of the specified match address