Class BrokerFactory

java.lang.Object
org.apache.activemq.broker.BrokerFactory

public final class BrokerFactory extends Object
A helper class to create a fully configured broker service using a URI. The list of currently supported URI syntaxes is described here
  • Method Details

    • createBrokerFactoryHandler

      public static BrokerFactoryHandler createBrokerFactoryHandler(String type) throws IOException
      Throws:
      IOException
    • createBroker

      public static BrokerService createBroker(URI brokerURI) throws Exception
      Creates a broker from a URI configuration
      Parameters:
      brokerURI - the URI scheme to configure the broker
      Throws:
      Exception
    • createBroker

      public static BrokerService createBroker(URI brokerURI, boolean startBroker) throws Exception
      Creates a broker from a URI configuration
      Parameters:
      brokerURI - the URI scheme to configure the broker
      startBroker - whether or not the broker should have its BrokerService.start() method called after construction
      Throws:
      Exception
    • createBroker

      public static BrokerService createBroker(String brokerURI) throws Exception
      Creates a broker from a URI configuration
      Parameters:
      brokerURI - the URI scheme to configure the broker
      Throws:
      Exception
    • createBroker

      public static BrokerService createBroker(String brokerURI, boolean startBroker) throws Exception
      Creates a broker from a URI configuration
      Parameters:
      brokerURI - the URI scheme to configure the broker
      startBroker - whether or not the broker should have its BrokerService.start() method called after construction
      Throws:
      Exception
    • setStartDefault

      public static void setStartDefault(boolean startDefault)
    • resetStartDefault

      public static void resetStartDefault()
    • getStartDefault

      public static boolean getStartDefault()