IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.services
Class BTTServiceImpl

java.lang.Object
  extended bycom.ibm.btt.base.Service
      extended bycom.ibm.btt.services.BTTServiceImpl
All Implemented Interfaces:
BTTService, Externalizable, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
PoolableServiceImpl

public abstract class BTTServiceImpl
extends Service
implements BTTService

The BTTServiceImpl class is the super class of all Composer service, which is Web Service, Remote EJB or Local Java, in BTT 5.0.

See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_RESPONSE
          Default response whenever there is no result return from executed methods.
 
Fields inherited from class com.ibm.btt.base.Service
externalizer, name
 
Fields inherited from interface com.ibm.btt.services.BTTService
COMPID
 
Constructor Summary
BTTServiceImpl()
           
 
Method Summary
 long getInactiveTimeout()
           
 long getLastAccess()
          Get the last access time of the requester instance
abstract  java.lang.Object handleCommand(java.lang.String opName, java.util.Hashtable parts)
          This method must be inplemented by Service developers to handle commands to the service.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes the Service reading its attributes values from aTag.
 java.lang.Object processRequest(java.lang.String opName, java.util.Hashtable parts)
          Command interface for the service.
 void setInactiveTimeout(long time)
           
 void setLastAccess(long time)
          Set the last access time of the requester instance
 
Methods inherited from class com.ibm.btt.base.Service
externalizer, getExternalizer, getName, getTagName, readExternal, readExternal, readObject, removeExternal, setExternalizer, setName, terminate, toString, toStrings, toTags, writeExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_RESPONSE

public static java.lang.String DEFAULT_RESPONSE
Default response whenever there is no result return from executed methods.

Constructor Detail

BTTServiceImpl

public BTTServiceImpl()
Method Detail

processRequest

public java.lang.Object processRequest(java.lang.String opName,
                                       java.util.Hashtable parts)
                                throws java.lang.Exception
Description copied from interface: BTTService
Command interface for the service.

Specified by:
processRequest in interface BTTService
Parameters:
opName - An operation name to indicate which process will be performed
parts - A Hashtable to store the parameter for a process
Returns:
Object A object which need to be serializable
Throws:
java.lang.Exception
See Also:
Inside this class, the processRequest will invoke handleCommand to do request dispatched.

handleCommand

public abstract java.lang.Object handleCommand(java.lang.String opName,
                                               java.util.Hashtable parts)
                                        throws java.lang.Exception
This method must be inplemented by Service developers to handle commands to the service. It works like a work dispatcher based on the operation Name.

Parameters:
opName - Operation Name
parts - Operation parameters
Returns:
Object Execution result. The object must be serializable.
Throws:
java.lang.Exception

getLastAccess

public long getLastAccess()
Get the last access time of the requester instance

Returns:
long

setLastAccess

public void setLastAccess(long time)
Set the last access time of the requester instance

Parameters:
time - Last access time

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException,
                                       DSEException
Initializes the Service reading its attributes values from aTag.

Specified by:
initializeFrom in interface Externalizable
Overrides:
initializeFrom in class Service
Parameters:
aTag - com.ibm.dse.base.Tag
Returns:
java.lang.Object - this object
Throws:
java.io.IOException
DSEException

getInactiveTimeout

public long getInactiveTimeout()
Returns:
long

setInactiveTimeout

public void setInactiveTimeout(long time)
Parameters:
time -

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005