dbXML API

## com.dbxml.db.server
Class Server

    java.lang.Object
      com.dbxml.db.server.Server

public final class Server
extends java.lang.Object

The Server class is the glue that holds the dbXML server together. It is used to bootstrap the server as well as to instantiate and start the various system services.

Constructor Summary
`Server()`
`Server(java.lang.String name)`

Method Summary
`void` `addTask(Task task, long interval)` addTask adds an interval Task to the Server instance or overrides a previously defined interval.
`static Server` `getInstance()` getInstance returns the VM's Server instance.
`Service` `getService(java.lang.String name)` getService retrieves a registered Service by name.
`boolean` `isRunning()` isRunning returns whether or not the Services are all running.
`java.lang.String[]` `listServices()` listServices lists the names of all registered Services.
`static void` `main(java.lang.String[] args)`
`void` `removeTask(Task task)` removeTasks removes an interval Task from the Server instance.
`void` `shutDown(int exitCode)` shutDown shuts down the Server instance.
`static void` `stop(java.lang.String[] args)`

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

Constructor Detail

### Server

    public Server()

### Server

    public Server(java.lang.String name)

Method Detail

### main

    public static void main(java.lang.String[] args)

### stop

    public static void stop(java.lang.String[] args)

### getInstance

    public static Server getInstance()

  getInstance returns the VM's Server instance. Only one instance reference is allowed per VM, and any new instance will shadow the previous one.

  Returns:
    The Server instance

### addTask

    public void addTask(Task task,
                        long interval)

  addTask adds an interval Task to the Server instance or overrides a previously defined interval.

  Parameters:
    `task` - The Task to add
    `interval` - The Interval (milliseconds)

### removeTask

    public void removeTask(Task task)

  removeTasks removes an interval Task from the Server instance.

  Parameters:
    `task` - The task to remove

### shutDown

    public void shutDown(int exitCode)

  shutDown shuts down the Server instance. This will trigger a shutdown handler that will cleanly stop any active Services.

  Parameters:
    `exitCode` - The shutdown exit code

### isRunning

    public boolean isRunning()

  isRunning returns whether or not the Services are all running.

  Returns:
    Whether or not the Services are running.

### listServices

    public java.lang.String[] listServices()

  listServices lists the names of all registered Services.

  Returns:
    The Service list

### getService

    public Service getService(java.lang.String name)

  getService retrieves a registered Service by name.

  Parameters:
    `name` - The Service name
  Returns:
    The Service

dbXML API

Copyright (c) 2004 The dbXML Group