Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| dbXML API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.dbxml.db.server
Class SimpleService

    java.lang.Object
      com.dbxml.util.SimpleConfigurable
          com.dbxml.db.server.SimpleService

All Implemented Interfaces:
  Configurable, Service

Direct Known Subclasses:
  DBService, HTTPService, PageFilterService

public class SimpleService
extends SimpleConfigurable
implements Service

SimpleService is a basic Service implementation that will manage the the basic properties of a Service as well as implement default behavior for the service management methods.

Field Summary
`static java.lang.String` | `NAME`

Fields inherited from interface com.dbxml.db.server.Service
`RESULT_BUSY, RESULT_FAILED, RESULT_INVALID, RESULT_OK, STATE_STARTED, STATE_STOPPED, STATE_SUSPENDED`

Constructor Summary
`SimpleService()`

Method Summary
`void` | `dispose()` dispose prepares the Service for garbage collection.
`java.lang.String` | `getName()` getName returns the name of this Service.
`int` | `initialize()` initialize will initialize the Service based on its current configuration.
`int` | `resume()` resume resumes exection of a suspended Service.
`void` | `setConfig(Configuration config)` setConfig sets the configuration information for the Configurable object instance.
`void` | `setServerInstance(Server server)` setServerInstance sets the Server instance for this Service.
`int` | `start()` start will attempt to start the Service.
`int` | `status()` status returns the current operational status of this Service.
`java.lang.String` | `statusMessage()` statusMessage returns a textual message about the Service's operational state.
`int` | `stop()` stop will attempt to stop the Service.
`int` | `suspend()` suspend suspends execution of the Service.
`int` | `uninitialize()` uninitialize will uninitialize the Service based on its current configuration and will clean up any existing resources for that configuration.

Methods inherited from class com.dbxml.util.SimpleConfigurable
`getConfig`

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

Field Detail

### NAME

    public static final java.lang.String NAME

See Also:
  Constant Field Values

Constructor Detail

### SimpleService

    public SimpleService()

Method Detail

### setServerInstance

    public void setServerInstance(Server server)

  Description copied from interface: `Service`
  setServerInstance sets the Server instance for this Service.

  Specified by:
    `setServerInstance` in interface `Service`
  Parameters:
    `server` - The Server instance

### setConfig

    public void setConfig(Configuration config)
                   throws dbXMLException

  Description copied from interface: `Configurable`
  setConfig sets the configuration information for the Configurable object instance.

  Specified by:
    `setConfig` in interface `Configurable`
  Overrides:
    `setConfig` in class `SimpleConfigurable`
  Throws:
    `dbXMLException`

### getName

    public java.lang.String getName()

  Description copied from interface: `Service`
  getName returns the name of this Service.

  Specified by:
    `getName` in interface `Service`
  Returns:
    The Service name

### status

    public int status()

  Description copied from interface: `Service`
  status returns the current operational status of this Service. This value can either be STATE_STOPPED, STATE_STARTED, or STATE_SUSPENDED.

  Specified by:
    `status` in interface `Service`
  Returns:
    The Service's status

### statusMessage

    public java.lang.String statusMessage()

  Description copied from interface: `Service`
  statusMessage returns a textual message about the Service's operational state.

  Specified by:
    `statusMessage` in interface `Service`
  Returns:
    The Service's status as a text message

### initialize

    public int initialize()

  Description copied from interface: `Service`
  initialize will initialize the Service based on its current configuration. RESULT_INVALID will be returned if the Service's configuration is invalid.

  Specified by:
    `initialize` in interface `Service`
  Returns:
    The initialization status

### start

    public int start()

  Description copied from interface: `Service`
  start will attempt to start the Service. Depending on whether the Service was happy about being started or not, a value of RESULT_OK should be returned.

  Specified by:
    `start` in interface `Service`
  Returns:
    The result of the start attempt

### stop

    public int stop()

  Description copied from interface: `Service`
  stop will attempt to stop the Service. Depending on whether the Service was happy about being stopped or not, a value of RESULT_OK should be returned.

  Specified by:
    `stop` in interface `Service`
  Returns:
    The result of the stop attempt

### suspend

    public int suspend()

  Description copied from interface: `Service`
  suspend suspends execution of the Service. It basically puts it into a paused state until it is resumed or started again. Depending on whether the Service was happy about being suspended or not, a value of RESULT_OK should be returned.

  Specified by:
    `suspend` in interface `Service`
  Returns:
    The result of the suspend attempt

### resume

    public int resume()

  Description copied from interface: `Service`
  resume resumes exection of a suspended Service. It will also start a stopped Service. Depending on whether the Service was happy about being resumed or not, a value of RESULT_OK should be returned.

  Specified by:
    `resume` in interface `Service`
  Returns:
    The result of the resume attempt

### uninitialize

    public int uninitialize()

  Description copied from interface: `Service`
  uninitialize will uninitialize the Service based on its current configuration and will clean up any existing resources for that configuration. RESULT_INVALID will be returned if the Service's configuration is invalid.

  Specified by:
    `uninitialize` in interface `Service`
  Returns:
    The uninitialization status

### dispose

    public void dispose()

  Description copied from interface: `Service`
  dispose prepares the Service for garbage collection. Any references that the object might be maintaining should be cleared when this method is called.

  Specified by:
    `dispose` in interface `Service`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| dbXML API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004 The dbXML Group