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 overActiveMQServerandManagementService.- Author:
- Emmanuel Hugonnet (c) 2023 Red Hat, Inc.
-
-
Constructor Summary
Constructors Constructor Description ActiveMQBrokerImpl(org.apache.activemq.artemis.core.server.ActiveMQServer delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConnectorConfiguration(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.ActiveMQServerControlgetActiveMQServerControl()Returns heActiveMQServerControlto manage the underlyingActiveMQServer.ObjectgetDelegate()To get an untyped access toActiveMQServer.org.apache.activemq.artemis.api.core.SimpleStringgetNodeID()ObjectgetResource(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.
-
-
-
Method Detail
-
getDelegate
public Object 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 ExceptionDescription 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 ExceptionDescription 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
public boolean hasResource(String resourceName)
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
public Object getResource(String resourceName)
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
public Object[] getResources(Class<?> resourceType)
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 heActiveMQServerControlto manage the underlyingActiveMQServer.- Specified by:
getActiveMQServerControlin interfaceActiveMQBroker- Returns:
- the
ActiveMQServerControl
-
-