IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class Service

java.lang.Object
  extended by com.ibm.btt.base.DSENotifier
      extended by com.ibm.btt.base.Service
All Implemented Interfaces:
Notifier, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
CommunicationsPool, CSClient, CSServer, GenericPool, ILogRuleProviderService, JavaCodeRuleProviderService, JDBCService, JDBCServicesConnectionManager, LDAPService, MQConnection

@ATTR(value={"id#String#REQUIRED","implClass#String#IMPLIED"})
public abstract class Service
extends DSENotifier
implements Externalizable

Abstract parent class of all services.

See Also:
Serialized Form

Field Summary
protected static Externalizer externalizer
           
protected  java.lang.String name
           
 
Fields inherited from class com.ibm.btt.base.DSENotifier
handlersList
 
Constructor Summary
Service()
          Service default constructor.
Service(java.lang.String aName)
          Constructs a Service instance with a name attribute set to aName.
 
Method Summary
 Externalizer externalizer()
          Gets the externalizer attribute value set to a ServiceExternalizer instance.
static Externalizer getExternalizer()
          Gets the ServiceExternalizer.
 java.lang.String getTagName()
          Gets a tag name.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes the Service reading its attributes values from aTag.
 void readExternal()
          Initializes the Service with the attributes set in the external services definition file.
 void readExternal(java.io.ObjectInput s)
          Invokes the object creation from an ObjectInput.
static java.lang.Object readObject(java.lang.String name)
          Invokes the services externalizer to read the object with the specified name from the external definition file.
 void removeExternal()
          Removes the tags for the Service instance that were previously read from the external file that keeps the service definition.
static void setExternalizer(Externalizer ext)
          Sets the externalizer attribute value to a ServiceExternalizer.
 void terminate()
          Housekeeping process for the service instance.
 java.lang.String toString()
          Returns an XML representation of this Service.
 Vector toStrings()
          Returns a Vector containing an XML representation of this Service.
 Vector toTags()
          Returns a Vector with the Service represented by tags.
 void writeExternal()
          Writes the Service instance converted to tags in a file.
 void writeExternal(java.io.ObjectOutput s)
          Provides concrete serialization handling for Service.
 
Methods inherited from class com.ibm.btt.base.DSENotifier
addHandler, getHandlersList, getName, removeHandler, setName, signalEvent, signalEvent, signalEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.btt.base.Externalizable
getName, setName
 

Field Detail

externalizer

protected static Externalizer externalizer

name

protected java.lang.String name
Constructor Detail

Service

public Service()
Service default constructor.


Service

public Service(java.lang.String aName)
        throws java.io.IOException
Constructs a Service instance with a name attribute set to aName.

Parameters:
aName - java.lang.String
Throws:
java.io.IOException
Method Detail

externalizer

public Externalizer externalizer()
Gets the externalizer attribute value set to a ServiceExternalizer instance.

Returns:
com.ibm.dse.base.Externalizer

getExternalizer

public static Externalizer getExternalizer()
Gets the ServiceExternalizer.

Returns:
com.ibm.dse.base.Externalizer

getTagName

public java.lang.String getTagName()
Gets a tag name.

Returns:
java.lang.String

initializeFrom

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

Parameters:
aTag - com.ibm.dse.base.Tag
Returns:
java.lang.Object
Throws:
java.io.IOException
DSEException

readExternal

public void readExternal()
                  throws java.io.IOException
Initializes the Service with the attributes set in the external services definition file.

Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput s)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Invokes the object creation from an ObjectInput.

Specified by:
readExternal in interface java.io.Externalizable
Parameters:
s - java.io.ObjectInput
Throws:
java.io.IOException
java.lang.ClassNotFoundException

readObject

public static java.lang.Object readObject(java.lang.String name)
                                   throws java.io.IOException
Invokes the services externalizer to read the object with the specified name from the external definition file.

Parameters:
name - java.lang.String
Returns:
java.lang.Object
Throws:
java.io.IOException

removeExternal

public void removeExternal()
                    throws java.io.IOException
Removes the tags for the Service instance that were previously read from the external file that keeps the service definition.

Throws:
java.io.IOException

setExternalizer

public static void setExternalizer(Externalizer ext)
Sets the externalizer attribute value to a ServiceExternalizer.

Parameters:
ext - com.ibm.dse.base.Externalizer

terminate

public void terminate()
               throws DSEException
Housekeeping process for the service instance. This is called either from the application or from the context when it is destroyed or unchained. Subclasses should overwrite this implementation to perform whatever actions needed for releasing all the resources acquired by the service.

Specified by:
terminate in interface Notifier
Overrides:
terminate in class DSENotifier
Throws:
DSEException

toString

public java.lang.String toString()
Returns an XML representation of this Service.

Overrides:
toString in class java.lang.Object
Returns:
java.lang.String

toStrings

public Vector toStrings()
Returns a Vector containing an XML representation of this Service.

Returns:
com.ibm.dse.base.Vector

toTags

public Vector toTags()
              throws java.io.IOException
Returns a Vector with the Service represented by tags.

Returns:
com.ibm.dse.base.Vector
Throws:
java.io.IOException

writeExternal

public void writeExternal()
                   throws java.io.IOException
Writes the Service instance converted to tags in a file.

Throws:
java.io.IOException

writeExternal

public void writeExternal(java.io.ObjectOutput s)
                   throws java.io.IOException
Provides concrete serialization handling for Service.

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
s - java.io.ObjectOutput
Throws:
java.io.IOException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2010