Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.core.ext
Class ServletContainerLauncher

    java.lang.Object
      com.google.gwt.core.ext.ServletContainerLauncher

    public abstract class ServletContainerLauncher

extends java.lang.Object

Defines the service provider interface for launching servlet containers that can be used by the GWT development mode.

Subclasses should be careful about calling any methods defined on this class or else they risk failing when used with a version of GWT that did not have those methods.

Constructor Summary
`ServletContainerLauncher()`

Method Summary
`byte[]` | `getIconBytes()`
`java.lang.String` | `getIconPath()` Deprecated. see `getIconBytes()` instead.
`java.lang.String` | `getName()`
`boolean` | `isSecure()` Return true if this servlet container launcher is configured for secure operation (ie, HTTPS).
`boolean` | `processArguments(TreeLogger logger, java.lang.String arguments)` Process any supplied arguments.
`void` | `setBindAddress(java.lang.String bindAddress)` Set the bind address for the web server socket.
`abstract ServletContainer` | `start(TreeLogger logger, int port, java.io.File appRootDir)` Start an embedded HTTP servlet container.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ServletContainerLauncher

    public ServletContainerLauncher()

Method Detail

### getIconBytes

    public byte[] getIconBytes()

  Returns:
    byte array containing an icon (fitting into 24x24) to use for the server, or null if only the name should be used

### getIconPath

    @Deprecated
    public java.lang.String getIconPath()

  Deprecated. see `getIconBytes()` instead.

  Returns:
    a path to a 24-pixel high image file (relative to the classpath) to be used for this servlet container, or null if none.

### getName

    public java.lang.String getName()

  Returns:
    a short human-readable name of this servlet container, or null if no name should be displayed.

### isSecure

    public boolean isSecure()

  Return true if this servlet container launcher is configured for secure operation (ie, HTTPS). This value is only queried after arguments, if any, have been processed. The default implementation just returns false.

  Returns:
    true if HTTPS is in use

### processArguments

    public boolean processArguments(TreeLogger logger,
                                    java.lang.String arguments)

  Process any supplied arguments.

  Will be called before `start(TreeLogger, int, File)`, if at all.

  Parameters:
    `logger` - logger to use for warnings/errors
    `arguments` - single string containing the arguments for this SCL, the format to be defined by the SCL
  Returns:
    true if the arguments were processed successfully

### setBindAddress

    public void setBindAddress(java.lang.String bindAddress)

  Set the bind address for the web server socket.

  Will be called before `start(TreeLogger, int, File)`, if at all. If not called, the SCL should listen on all addresses.

  Parameters:
    `bindAddress` - host name or IP address, suitable for use with `InetAddress.getByName(String)`

### start

    public abstract ServletContainer start(TreeLogger logger,
                                           int port,
                                           java.io.File appRootDir)
                                    throws java.net.BindException,
                                           java.lang.Exception

  Start an embedded HTTP servlet container.

  Parameters:
    `logger` - the server logger
    `port` - the TCP port to serve on; if 0 is requested, a port should be automatically selected
    `appRootDir` - the base WAR directory
  Returns:
    the launched servlet container
  Throws:
    `java.net.BindException` - if the requested port is already in use
    `java.lang.Exception` - if the server fails to start for any other reason

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD