Posted By

laurenceosx on 03/26/13


Tagged

groovy


Versions (?)

Groovy - stopJetty


 / Published in: Groovy
 

URL: http://grepcode.com/file/repo1.maven.org/maven2/org.eclipse.jetty/jetty-start/7.1.1.v20100517/org/eclipse/jetty/start/Main.java#Main.stop%28int%2Cjava.lang.String%29

See: http://grepcode.com/file/repo1.maven.org/maven2/org.eclipse.jetty/jetty-start/7.1.1.v20100517/org/eclipse/jetty/start/Main.java#Main.stop%28int%2Cjava.lang.String%29

  1. def stopJetty( int aStopPort = 8081, String aHostName = 'localhost', String aStopKey = 'stop' ) {
  2. new Socket(aHostName, aStopPort).with {
  3. outputStream.write( "${aStopKey}\r\nstop\r\n".toString().bytes );
  4. outputStream.flush();
  5. close();
  6. }
  7. }

Report this snippet  

You need to login to post a comment.