Class ActiveMQBrokerImpl
java.lang.Object
org.wildfly.extension.messaging.activemq.ActiveMQBrokerImpl
- All Implemented Interfaces:
ActiveMQBroker
Implementation of the wrapper over
ActiveMQServer and
ManagementService.- Author:
- Emmanuel Hugonnet (c) 2023 Red Hat, Inc.
-
Constructor Summary
ConstructorsConstructorDescriptionActiveMQBrokerImpl(org.apache.activemq.artemis.core.server.ActiveMQServer delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConnectorConfiguration(String string, org.apache.activemq.artemis.api.core.TransportConfiguration tc) Add a connection configuration to the currentActiveMQServer.voidcreateQueue(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 underlyingActiveMQServer.voiddestroyQueue(org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.core.security.SecurityAuth session, boolean checkConsumerCount) Destroys a queue from the underlyingActiveMQServer.org.apache.activemq.artemis.api.core.management.ActiveMQServerControlReturns theActiveMQServerControlto manage the underlyingActiveMQServer.getAddressSettingsAsJSON(String addressMatch) Returns the JSON description of the address settings of the specified match address.To get an untyped access toActiveMQServer.org.apache.activemq.artemis.api.core.SimpleStringgetResource(String resourceName) Returns the untyped resource with the specified name- null if none exists.Object[]getResources(Class<?> resourceType) Returns an untyped array of the resources of this type - an empty arry if none exists.booleanhasResource(String resourceName) Returns true if the resource exists - false otherwise.booleanisActive()Returns the current state of the server: true - if the server is started and active - false otherwise.
-
Constructor Details
-
ActiveMQBrokerImpl
public ActiveMQBrokerImpl(org.apache.activemq.artemis.core.server.ActiveMQServer delegate)
-
-
Method Details
-
getDelegate
Description copied from interface:ActiveMQBrokerTo get an untyped access toActiveMQServer.- Specified by:
getDelegatein interfaceActiveMQBroker- Returns:
- the underlying
ActiveMQServer
-
getNodeID
public org.apache.activemq.artemis.api.core.SimpleString getNodeID()- Specified by:
getNodeIDin interfaceActiveMQBroker- Returns:
- the server node id.
-
addConnectorConfiguration
public void addConnectorConfiguration(String string, org.apache.activemq.artemis.api.core.TransportConfiguration tc) Description copied from interface:ActiveMQBrokerAdd a connection configuration to the currentActiveMQServer.- Specified by:
addConnectorConfigurationin interfaceActiveMQBroker- 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:ActiveMQBrokerCreates a Queue on the underlyingActiveMQServer.- Specified by:
createQueuein interfaceActiveMQBroker- 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:ActiveMQBrokerDestroys a queue from the underlyingActiveMQServer.- Specified by:
destroyQueuein interfaceActiveMQBroker- Throws:
Exception
-
isActive
public boolean isActive()Description copied from interface:ActiveMQBrokerReturns the current state of the server: true - if the server is started and active - false otherwise.- Specified by:
isActivein interfaceActiveMQBroker- Returns:
- the current state of the server: true - if the server is started and active - false otherwise.
-
hasResource
Description copied from interface:ActiveMQBrokerReturns true if the resource exists - false otherwise.- Specified by:
hasResourcein interfaceActiveMQBroker- Parameters:
resourceName- : the name of the reosurce.- Returns:
- true if the resource exists - false otherwise.
-
getResource
Description copied from interface:ActiveMQBrokerReturns the untyped resource with the specified name- null if none exists.- Specified by:
getResourcein interfaceActiveMQBroker- Parameters:
resourceName- : the name of the resource.- Returns:
- the untyped resource with the specified name- null if none exists.
-
getResources
Description copied from interface:ActiveMQBrokerReturns an untyped array of the resources of this type - an empty arry if none exists.- Specified by:
getResourcesin interfaceActiveMQBroker- 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:ActiveMQBrokerReturns theActiveMQServerControlto manage the underlyingActiveMQServer.- Specified by:
getActiveMQServerControlin interfaceActiveMQBroker- Returns:
- the
ActiveMQServerControl
-
getAddressSettingsAsJSON
Description copied from interface:ActiveMQBrokerReturns the JSON description of the address settings of the specified match address.- Specified by:
getAddressSettingsAsJSONin interfaceActiveMQBroker- Parameters:
addressMatch- the address settings match address.- Returns:
- the JSON description of the address settings of the specified match address
-