org.nuiton.util.war
Class JettyLauncher

java.lang.Object
  extended by org.nuiton.util.war.JettyLauncher
All Implemented Interfaces:
ActionListener, MouseListener, EventListener

public class JettyLauncher
extends Object
implements ActionListener, MouseListener

War main class launcher (jetty based). To use it : java -jar app-xxx.war

Since:
1.1.2 Last update : $Date: 2009-12-17 16:34:04 +0100 (jeu., 17 déc. 2009) $ By : $Author$
Version:
$Revision: 1716 $
Author:
chatellier

Field Summary
protected  org.eclipse.jetty.server.Server jettyServer
          Jetty server instance.
protected  int port
          Default port.
protected  URI serverUri
          Server URI.
 
Constructor Summary
JettyLauncher()
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
protected  void installSystemTray()
          Install system tray to stop server.
static void main(String[] args)
          Main method (used by war in manifest).
 void mouseClicked(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
protected  void openBrowser()
          Open browser.
protected  void startServer(String[] args)
          Launch servlet container.
protected  void stopServer()
          Shutdown server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jettyServer

protected org.eclipse.jetty.server.Server jettyServer
Jetty server instance.


serverUri

protected URI serverUri
Server URI.


port

protected int port
Default port.

Constructor Detail

JettyLauncher

public JettyLauncher()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Main method (used by war in manifest).

Parameters:
args - args
Throws:
Exception

startServer

protected void startServer(String[] args)
                    throws Exception
Launch servlet container.

Parameters:
args - args
Throws:
Exception

stopServer

protected void stopServer()
Shutdown server.


installSystemTray

protected void installSystemTray()
Install system tray to stop server.


actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

openBrowser

protected void openBrowser()
Open browser.

Throws:
IOException

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener


Copyright © 2004-2009 CodeLutin. All Rights Reserved.