org.h2.server

## Interface Service

All Known Implementing Classes:
  FtpServer, PgServer, TcpServer, WebServer

    public interface Service

Classes implementing this interface usually provide a TCP/IP listener such as an FTP server. The can be started and stopped, and may or may not allow remote connections.

### Method Summary

Methods
`boolean` `getAllowOthers()` Check if remote connections are allowed.
`java.lang.String` `getName()` Get the human readable name of the service.
`int` `getPort()` Gets the port this service is listening on.
`java.lang.String` `getType()` Get the human readable short name of the service.
`java.lang.String` `getURL()` Get the URL of this service in a human readable form
`void` `init(java.lang.String... args)` Initialize the service from command line options.
`boolean` `isDaemon()` Check if a daemon thread should be used.
`boolean` `isRunning(boolean traceError)` Check if the service is running.
`void` `listen()` Listen for incoming connections.
`void` `start()` Start the service.
`void` `stop()` Stop the service.

### Method Detail

#### init

    void init(java.lang.String... args)
              throws java.lang.Exception

Initialize the service from command line options.

Parameters:
  `args` - the command line options
Throws:
  `java.lang.Exception`

#### getURL

    java.lang.String getURL()

Get the URL of this service in a human readable form

Returns:
  the url

#### start

    void start()
               throws java.sql.SQLException

Start the service. This usually means create the server socket. This method must not block.

Throws:
  `java.sql.SQLException`

#### listen

    void listen()

Listen for incoming connections. This method blocks.

#### stop

    void stop()

Stop the service.

#### isRunning

    boolean isRunning(boolean traceError)

Check if the service is running.

Parameters:
  `traceError` - if errors should be written
Returns:
  if the server is running

#### getAllowOthers

    boolean getAllowOthers()

Check if remote connections are allowed.

Returns:
  true if remote connections are allowed

#### getName

    java.lang.String getName()

Get the human readable name of the service.

Returns:
  the name

#### getType

    java.lang.String getType()

Get the human readable short name of the service.

Returns:
  the type

#### getPort

    int getPort()

Gets the port this service is listening on.

Returns:
  the port

#### isDaemon

    boolean isDaemon()

Check if a daemon thread should be used.

Returns:
  true if a daemon thread should be used