org.dbxml.core.server.services
Class APIService
java.lang.Object
|
+--org.dbxml.server.SimpleConfigurable
|
+--org.dbxml.core.server.services.APIService
- All Implemented Interfaces:
- org.dbxml.server.Configurable, org.dbxml.server.KernelAccess, org.dbxml.server.ManagerService, org.dbxml.server.Named, java.lang.Runnable, org.dbxml.server.Service
- public class APIService
- extends org.dbxml.server.SimpleConfigurable
- implements org.dbxml.server.Service, org.dbxml.server.KernelAccess, java.lang.Runnable, org.dbxml.server.ManagerService
APIService provides a simple bootstrap for the CORBA API
Fields inherited from interface org.dbxml.server.Service |
RESULT_BUSY, RESULT_FAILED, RESULT_INVALID, RESULT_OK, STATE_STARTED, STATE_STOPPED, STATE_SUSPENDED |
Method Summary |
java.lang.String |
getName()
getName retrieves the contextually important name of the object |
int |
initialize()
|
int |
resume()
resume resumes exection of a suspended Service. |
void |
run()
|
void |
setConfig(org.dbxml.server.Configuration config)
|
void |
setKernel(org.dbxml.server.Kernel kernel)
|
void |
setServiceManager(org.dbxml.server.ServiceManager serviceManager)
|
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 org.dbxml.server.SimpleConfigurable |
getConfig |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
APIService
public APIService()
setConfig
public void setConfig(org.dbxml.server.Configuration config)
throws org.dbxml.server.dbXMLException
- Overrides:
setConfig
in class org.dbxml.server.SimpleConfigurable
initialize
public int initialize()
- Specified by:
initialize
in interface org.dbxml.server.Service
setServiceManager
public void setServiceManager(org.dbxml.server.ServiceManager serviceManager)
- Specified by:
setServiceManager
in interface org.dbxml.server.ManagerService
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
setKernel
public void setKernel(org.dbxml.server.Kernel kernel)
- Specified by:
setKernel
in interface org.dbxml.server.KernelAccess
status
public int status()
- 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 org.dbxml.server.Service
- Returns:
- The Service's status
statusMessage
public java.lang.String statusMessage()
- statusMessage returns a textual message about the Service's
operational state.
- Specified by:
statusMessage
in interface org.dbxml.server.Service
- Returns:
- The Service's status as a text message
start
public int start()
- 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 org.dbxml.server.Service
- Returns:
- The result of the start attempt
stop
public int stop()
- 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 org.dbxml.server.Service
- Returns:
- The result of the stop attempt
suspend
public int suspend()
- 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 org.dbxml.server.Service
- Returns:
- The result of the suspend attempt
resume
public int resume()
- 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 org.dbxml.server.Service
- Returns:
- The result of the resume attempt
uninitialize
public int uninitialize()
- 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 org.dbxml.server.Service
- Returns:
- The uninitialization status
getName
public java.lang.String getName()
- getName retrieves the contextually important name of the object
- Specified by:
getName
in interface org.dbxml.server.Named
- Returns:
- The object's name
Copyright (c) 1999-2001 The dbXML Group, All rights reserved