net.kindleit.gae.runner
Class AppEnginePluginMonitor

java.lang.Object
  extended by net.kindleit.gae.runner.AppEnginePluginMonitor
All Implemented Interfaces:
Runnable

public final class AppEnginePluginMonitor
extends Object
implements Runnable

Listens for stop commands e.g. via mvn gae:stop and causes the development server to stop.

Since:
0.5.8
Author:
tmoore@incrementalism.net

Nested Class Summary
static class AppEnginePluginMonitor.Commands
           
 
Constructor Summary
AppEnginePluginMonitor(int port, String key)
           
 
Method Summary
static void main(String[] args)
          Starts a monitor that can stop a KickStartRunner.
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppEnginePluginMonitor

public AppEnginePluginMonitor(int port,
                              String key)
                       throws IOException
Throws:
IOException
Method Detail

run

public void run()
Specified by:
run in interface Runnable

main

public static void main(String[] args)
Starts a monitor that can stop a KickStartRunner. The monitor opens a socket that listens on the specified port of localhost for the specified stop key. When it receives this stop key, followed by a CRLF, followed by the command "stop" and another CRLF, it will call KickStartRunner#stop() on the the specified runner.

Parameters:
stopPort - the port to listen on
stopKey - the string to listen for
kickStart - the KickStartRunner to stop
log - the Maven plugin logger to direct output to
Throws:
IOException - if an I/O error occurs while opening the server socket


Copyright © 2009-2010 KindleIT. All Rights Reserved.