Class DestinationsPlugin

All Implemented Interfaces:
Broker, BrokerPlugin, Region, org.apache.activemq.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
  • Constructor Details

    • DestinationsPlugin

      public DestinationsPlugin()
  • Method Details

    • addDestination

      public Destination addDestination(ConnectionContext context, org.apache.activemq.command.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 interface Region
      Overrides:
      addDestination in class BrokerFilter
      destination - the destination to create.
      Returns:
      TODO
      Throws:
      Exception - TODO
    • removeDestination

      public void removeDestination(ConnectionContext context, org.apache.activemq.command.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 interface Region
      Overrides:
      removeDestination in class BrokerFilter
      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 interface org.apache.activemq.Service
      Overrides:
      start in class BrokerPluginSupport
      Throws:
      Exception
    • stop

      public void stop() throws Exception
      Specified by:
      stop in interface org.apache.activemq.Service
      Overrides:
      stop in class BrokerPluginSupport
      Throws:
      Exception
    • importDestinations

      protected void importDestinations() throws Exception
      Throws:
      Exception
    • exportDestinations

      protected void exportDestinations() throws Exception
      Throws:
      Exception
    • getLocation

      public File getLocation()
    • setLocation

      public void setLocation(File location)