Package org.apache.activemq.broker.util
Class DestinationsPlugin
- java.lang.Object
-
- org.apache.activemq.broker.BrokerFilter
-
- org.apache.activemq.broker.MutableBrokerFilter
-
- org.apache.activemq.broker.BrokerPluginSupport
-
- org.apache.activemq.broker.util.DestinationsPlugin
-
- All Implemented Interfaces:
Broker
,BrokerPlugin
,Region
,Service
public class DestinationsPlugin extends BrokerPluginSupport
A simple plugin that can be used to export/import runtime destinations. It's useful in security constrained environments where you want to create destinations only through the management APIs and be able to replicate them to another broker
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.broker.MutableBrokerFilter
next
-
-
Constructor Summary
Constructors Constructor Description DestinationsPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Destination
addDestination(ConnectionContext context, ActiveMQDestination destination, boolean createIfTemporary)
Used to create a destination.protected void
exportDestinations()
File
getLocation()
protected void
importDestinations()
void
removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout)
Used to destroy a destination.void
setLocation(File location)
void
start()
void
stop()
-
Methods inherited from class org.apache.activemq.broker.BrokerPluginSupport
installPlugin
-
Methods inherited from class org.apache.activemq.broker.MutableBrokerFilter
getAdaptor, getNext, setNext
-
Methods inherited from class org.apache.activemq.broker.BrokerFilter
acknowledge, addBroker, addConnection, addConsumer, addDestinationInfo, addProducer, addSession, beginTransaction, brokerServiceStarted, commitTransaction, fastProducer, forgetTransaction, gc, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getDestinationMap, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getExecutor, getPeerBrokerInfos, getPreparedTransactions, getRoot, getScheduler, getTempDataStore, getVmConnectorURI, isExpired, isFaultTolerantConfiguration, isFull, isStopped, messageConsumed, messageDelivered, messageDiscarded, messageExpired, messagePull, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, postProcessDispatch, prepareTransaction, preProcessDispatch, processConsumerControl, processDispatchNotification, reapplyInterceptor, removeBroker, removeConnection, removeConsumer, removeDestinationInfo, removeProducer, removeSession, removeSubscription, rollbackTransaction, send, sendToDeadLetterQueue, setAdminConnectionContext, slowConsumer, virtualDestinationAdded, virtualDestinationRemoved
-
-
-
-
Method Detail
-
addDestination
public Destination addDestination(ConnectionContext context, ActiveMQDestination destination, boolean createIfTemporary) throws Exception
Description copied from interface:Region
Used to create a destination. Usually, this method is invoked as a side-effect of sending a message to a destination that does not exist yet.- Specified by:
addDestination
in interfaceRegion
- Overrides:
addDestination
in classBrokerFilter
destination
- the destination to create.- Returns:
- TODO
- Throws:
Exception
- TODO
-
removeDestination
public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception
Description copied from interface:Region
Used to destroy a destination. This should try to quiesce use of the destination up to the timeout allotted time before removing the destination. This will remove all persistent messages associated with the destination.- Specified by:
removeDestination
in interfaceRegion
- Overrides:
removeDestination
in classBrokerFilter
- Parameters:
context
- the environment the operation is being executed under.destination
- what is being removed from the broker.timeout
- the max amount of time to wait for the destination to quiesce- Throws:
Exception
- TODO
-
start
public void start() throws Exception
- Specified by:
start
in interfaceService
- Overrides:
start
in classBrokerPluginSupport
- Throws:
Exception
-
stop
public void stop() throws Exception
- Specified by:
stop
in interfaceService
- Overrides:
stop
in classBrokerPluginSupport
- Throws:
Exception
-
getLocation
public File getLocation()
-
setLocation
public void setLocation(File location)
-
-