Groovy - stopJetty


/ Published in: Groovy
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. def stopJetty( int aStopPort = 8081, String aHostName = 'localhost', String aStopKey = 'stop' ) {
  2. new Socket(aHostName, aStopPort).with {
  3. outputStream.write( "${aStopKey}
  4. stop
  5. ".toString().bytes );
  6. outputStream.flush();
  7. close();
  8. }
  9. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.