com.ibm.are.service
Class BaseService

java.lang.Object
  extended by com.ibm.are.service.BaseService
All Implemented Interfaces:
com.ibm.are.core.Element, Service

public abstract class BaseService
extends java.lang.Object
implements Service

The BaseService class is an abstract base class that implements some basic behavior required for a Service in the Application Runtime Expert. This class provides the following set of implemented features available for use by any sub-class:

Any violations of this contract will result in an InvalidServiceStateException being thrown.

This base class is a nice starting point for creating services for the Application Runtime Expert. However, it is perfectly acceptable to create a service that directly implements the Service interface and not extend this class at all.

Version:
1.0
Author:
IBM

Field Summary
static java.lang.String COPYRIGHT
          Copyright for class bytecode
protected  ServiceData serviceData
          Data specific to this service
 
Constructor Summary
BaseService()
           
 
Method Summary
 com.ibm.are.core.ElementData getElementData()
          
 void setElementData(com.ibm.are.core.ElementData newData)
          
 void start(java.util.List startArgs)
          Starts the service.
protected abstract  void startImpl(java.util.List startArgs)
           
 void stop(java.util.List stopArgs)
          Stops the service.
protected abstract  void stopImpl(java.util.List stopArgs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.are.core.Element
getCommonName, getDescription, getVersion
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright for class bytecode

See Also:
Constant Field Values

serviceData

protected ServiceData serviceData
Data specific to this service

Constructor Detail

BaseService

public BaseService()
Method Detail

start

public final void start(java.util.List startArgs)
Starts the service. The runtime will only invoke this method once per instance of a service, but there is nothing in the runtime that would prevent others from invoking a service's start() method multiple times. If a service cannot support multiple invocations of start(), then the service must put code in place to prevent this from occurring or to detect the condition and take the appropriate action.

Specified by:
start in interface Service
Parameters:
startArgs - Start arguments. Currently the runtime does not pass any arguments upon starting a service, so this list will always be empty.

stop

public final void stop(java.util.List stopArgs)
Stops the service. The runtime will only invoke this method once per instance of a service, but there is nothing in the runtime that would prevent others from invoking a service's stop() method multiple times. If a service cannot support multiple invocations of stop(), then the service must put code in place to prevent this from occurring or to detect the condition and take the appropriate action.

Specified by:
stop in interface Service
Parameters:
stopArgs - Stop arguments. Currently the runtime does not pass any arguments upon stopping a service, so this list will always be empty.

getElementData

public com.ibm.are.core.ElementData getElementData()

Specified by:
getElementData in interface com.ibm.are.core.Element

setElementData

public void setElementData(com.ibm.are.core.ElementData newData)

Specified by:
setElementData in interface com.ibm.are.core.Element

startImpl

protected abstract void startImpl(java.util.List startArgs)

stopImpl

protected abstract void stopImpl(java.util.List stopArgs)