Package com.btmatthews.utils.monitor

Examples of com.btmatthews.utils.monitor.Monitor


     * Create the monitor object tha is used to control a server.
     *
     * @return A {@link Monitor} object.
     */
    public Monitor createMonitor() {
        return new Monitor(monitorKey, monitorPort, monitorRetryCount, monitorRetryInterval);
    }
View Full Code Here


     * Execute the Mojo by launching the email servers and waiting for the stop
     * command. If the server daemon option is set the email servers are spun
     * off in a background thread.
     */
    public void execute() {
  final Monitor monitor = new Monitor(getMonitorKey(), getMonitorPort());
  final MailServer server = createServer();
  if (server != null) {
      server.setPortOffset(portOffset);
      server.setUseSSL(useSSL);
      server.start(this);
      if (daemon) {
    new Thread(new Runnable() {
        public void run() {
      monitor.runMonitor(server, RunMojo.this);
        }
    }).start();
      } else {
    monitor.runMonitor(server, this);
      }
  }
    }
View Full Code Here

     * server(s).
     *
     * @see Mojo#execute()
     */
    public void execute() {
  final Monitor monitor = new Monitor(getMonitorKey(), getMonitorPort());
  monitor.sendCommand("stop", this);
    }
View Full Code Here

     * Create the monitor object tha is used to control a server.
     *
     * @return A {@link Monitor} object.
     */
    public Monitor createMonitor() {
        return new Monitor(monitorKey, monitorPort);
    }
View Full Code Here

            server.configure(entry.getKey(), entry.getValue(), this);
        }

        // Run the monitor

        final Monitor monitor = createMonitor();
        if (daemon) {
            monitor.runMonitorDaemon(server, this, this);
        } else {
            monitor.runMonitor(server, this, this);
        }
    }
View Full Code Here

     * @throws org.apache.maven.plugin.MojoFailureException
     *          If there was an error stopping the embedded server.
     */
    @Override
    public void execute() throws MojoFailureException {
        final Monitor monitor = createMonitor();
        monitor.sendCommand("stop", this);
    }
View Full Code Here

     * Execute the Mojo by launching the email servers and waiting for the stop
     * command. If the server daemon option is set the email servers are spun
     * off in a background thread.
     */
    public void execute() {
        final Monitor monitor = new Monitor(getMonitorKey(), getMonitorPort());
        final MailServer server = createServer();
        if (server != null) {
            server.setPortOffset(portOffset);
            server.setUseSSL(useSSL);
            server.start(this);
            if (daemon) {
                new Thread(new Runnable() {
                    public void run() {
                        monitor.runMonitor(server, RunMojo.this);
                    }
                }).start();
            } else {
                monitor.runMonitor(server, this);
            }
        }
    }
View Full Code Here

    /**
     * Issue a stop command to the monitor in order to shutdown the email
     * server(s).
     */
    public void execute() {
        final Monitor monitor = new Monitor(getMonitorKey(), getMonitorPort());
        monitor.sendCommand("stop", this);
    }
View Full Code Here

     * @throws org.apache.maven.plugin.MojoFailureException
     *          If there was an error stopping the embedded server.
     */
    @Override
    public void execute() throws MojoFailureException {
        final Monitor monitor = createMonitor();
        monitor.sendCommand("stop", this);
    }
View Full Code Here

TOP

Related Classes of com.btmatthews.utils.monitor.Monitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.