Package org.apache.activemq.maven
Class MavenBrokerSingletonManager
- java.lang.Object
-
- org.apache.activemq.maven.MavenBrokerSingletonManager
-
- All Implemented Interfaces:
MavenBrokerManager
public class MavenBrokerSingletonManager extends Object implements MavenBrokerManager
Broker manager for use with Maven; uses the original singleton to track the broker instance.
-
-
Constructor Summary
Constructors Constructor Description MavenBrokerSingletonManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BrokerServicegetBroker()Return the broker service created.voidsetBroker(BrokerService broker)Override the default creation of the broker service.voidstart(boolean fork, String configUri)Start the broker using the fork setting and configuration at the given URI.voidstop()Stop the broker.protected voidwaitForShutdown()Wait for a shutdown invocation elsewhere
-
-
-
Method Detail
-
start
public void start(boolean fork, String configUri) throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from interface:MavenBrokerManagerStart the broker using the fork setting and configuration at the given URI.- Specified by:
startin interfaceMavenBrokerManager- Parameters:
fork- true => run the broker asynchronously; false => run the broker synchronously (this method does not return until the broker shuts down)configUri- URI of the broker configuration; prefix with "xbean:file" to read XML configuration from a file.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
stop
public void stop() throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from interface:MavenBrokerManagerStop the broker.- Specified by:
stopin interfaceMavenBrokerManager- Throws:
org.apache.maven.plugin.MojoExecutionException
-
waitForShutdown
protected void waitForShutdown() throws ExceptionWait for a shutdown invocation elsewhere- Throws:
Exception
-
getBroker
public BrokerService getBroker()
Return the broker service created.- Specified by:
getBrokerin interfaceMavenBrokerManager
-
setBroker
public void setBroker(BrokerService broker)
Override the default creation of the broker service. Primarily added for testing purposes.- Specified by:
setBrokerin interfaceMavenBrokerManager- Parameters:
broker-
-
-