Interface ActiveMQBroker
-
- All Known Implementing Classes:
ActiveMQBrokerImpl
public interface ActiveMQBrokerWrapper interface to expose methods fromActiveMQServerandManagementServicethat are needed by a/subsystem=messaging-activemq/server=*resource or its children."- Author:
- Emmanuel Hugonnet (c) 2023 Red Hat, Inc.
-
-
Method Summary
All Methods Instance Methods Abstract 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
Object getDelegate()
To get an untyped access toActiveMQServer.- Returns:
- the underlying
ActiveMQServer
-
getNodeID
org.apache.activemq.artemis.api.core.SimpleString getNodeID()
- Returns:
- the server node id.
-
addConnectorConfiguration
void addConnectorConfiguration(String string, org.apache.activemq.artemis.api.core.TransportConfiguration tc)
Add a connection configuration to the currentActiveMQServer.- Parameters:
string- : the name of the connector.tc- : the trnasport configurartion.
-
createQueue
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 ExceptionCreates a Queue on the underlyingActiveMQServer.- Parameters:
address- : the queue address.routingType- : the queue routing type (anycast or mulicast).queueName- : the name of the queue.filter- : the filter.durable-temporary-- Throws:
Exception
-
destroyQueue
void destroyQueue(org.apache.activemq.artemis.api.core.SimpleString queueName, org.apache.activemq.artemis.core.security.SecurityAuth session, boolean checkConsumerCount) throws ExceptionDestroys a queue from the underlyingActiveMQServer.- Parameters:
queueName-session-checkConsumerCount-- Throws:
Exception
-
isActive
boolean isActive()
Returns the current state of the server: true - if the server is started and active - false otherwise.- Returns:
- the current state of the server: true - if the server is started and active - false otherwise.
-
hasResource
boolean hasResource(String resourceName)
Returns true if the resource exists - false otherwise.- Parameters:
resourceName- : the name of the reosurce.- Returns:
- true if the resource exists - false otherwise.
-
getResource
Object getResource(String resourceName)
Returns the untyped resource with the specified name- null if none exists.- Parameters:
resourceName- : the name of the resource.- Returns:
- the untyped resource with the specified name- null if none exists.
-
getResources
Object[] getResources(Class<?> resourceType)
Returns an untyped array of the resources of this type - an empty arry if none exists.- Parameters:
resourceType- : the type of resources.- Returns:
- an untyped array of the resources of this type - an empty arry if none exists.
-
getActiveMQServerControl
org.apache.activemq.artemis.api.core.management.ActiveMQServerControl getActiveMQServerControl()
Returns heActiveMQServerControlto manage the underlyingActiveMQServer.- Returns:
- the
ActiveMQServerControl
-
-