Class 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 Detail

      • MavenBrokerSingletonManager

        public MavenBrokerSingletonManager()
    • Method Detail

      • start

        public void start​(boolean fork,
                          String configUri)
                   throws org.apache.maven.plugin.MojoExecutionException
        Description copied from interface: MavenBrokerManager
        Start the broker using the fork setting and configuration at the given URI.
        Specified by:
        start in interface MavenBrokerManager
        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.MojoExecutionException
        Description copied from interface: MavenBrokerManager
        Stop the broker.
        Specified by:
        stop in interface MavenBrokerManager
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • waitForShutdown

        protected void waitForShutdown()
                                throws Exception
        Wait for a shutdown invocation elsewhere
        Throws:
        Exception
      • setBroker

        public void setBroker​(BrokerService broker)
        Override the default creation of the broker service. Primarily added for testing purposes.
        Specified by:
        setBroker in interface MavenBrokerManager
        Parameters:
        broker -