net.i2p.jetty

## Class JettyStart

- java.lang.Object
- - net.i2p.jetty.JettyStart

- All Implemented Interfaces:
    ClientApp

      public class JettyStart
      extends Object
      implements ClientApp

  Start Jetty where the args are one or more XML files. Save a reference to the Server so it can be cleanly stopped later. Caller must call startup() This is like XmlConfiguration.main(), which is essentially what org.mortbay.start.Main does.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JettyStart(I2PAppContext context, ClientAppManager mgr, String[] args)` All args must be XML file names.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDisplayName()` The display name of the ClientApp, used in user interfaces.
    `String` | `getName()` The generic name of the ClientApp, used for registration, e.g.
    `ClientAppState` | `getState()` The current state of the ClientApp.
    `static void` | `main(String[] args)` For use in a plugin clients.config
    `void` | `shutdown(String[] args)` Do not take a long time.
    `void` | `startup()` Do not take a long time.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JettyStart

          public JettyStart(I2PAppContext context,
                            ClientAppManager mgr,
                            String[] args)
                     throws Exception

      All args must be XML file names. Does not support any of the other argument types from org.mortbay.start.Main.
      Parameters:
        `context` - may be null
        `mgr` - may be null e.g. for use in plugins
      Throws:
        `Exception`

  - ### Method Detail

    - #### getDisplayName

          public String getDisplayName()

      Description copied from interface: `ClientApp`
      The display name of the ClientApp, used in user interfaces. The app must translate.
      Specified by:
        `getDisplayName` in interface `ClientApp`
      Returns:
        non-null

    - #### getName

          public String getName()

      Description copied from interface: `ClientApp`
      The generic name of the ClientApp, used for registration, e.g. "console". Do not translate.
      Specified by:
        `getName` in interface `ClientApp`
      Returns:
        non-null

    - #### getState

          public ClientAppState getState()

      Description copied from interface: `ClientApp`
      The current state of the ClientApp.
      Specified by:
        `getState` in interface `ClientApp`
      Returns:
        non-null

    - #### main

          public static void main(String[] args)

      For use in a plugin clients.config
      Parameters:
        `args` - passed to constructor

    - #### shutdown

          public void shutdown(String[] args)

      Description copied from interface: `ClientApp`
      Do not take a long time. Do not block. Use a thread if necessary. If previously running, client must call ClientAppManager.notify() at least once within this method to change the state to STOPPING or STOPPED. May be called multiple times on the same object, in any state.
      Specified by:
        `shutdown` in interface `ClientApp`
      Parameters:
        `args` - generally null but could be stopArgs from clients.config

    - #### startup

          public void startup()

      Description copied from interface: `ClientApp`
      Do not take a long time. Do not block. Start threads here if necessary. Client must call ClientAppManager.notify() at least once within this method to change the state from INITIALIZED to something else. Will not be called multiple times on the same object.
      Specified by:
        `startup` in interface `ClientApp`