net.kindleit.gae.runner
Class AppEnginePluginMonitor

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

public final class AppEnginePluginMonitor
extends java.lang.Object
implements java.lang.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, java.lang.String key)
           
 
Method Summary
static void main(java.lang.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,
                              java.lang.String key)
                       throws java.io.IOException
Throws:
java.io.IOException
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

main

public static void main(java.lang.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:
java.io.IOException - if an I/O error occurs while opening the server socket


Copyright © 2009-2012 KindleIT. All Rights Reserved.