com.ibm.xsp.model
Class AbstractDataContainer

java.lang.Object
  extended by com.ibm.xsp.model.AbstractDataContainer
All Implemented Interfaces:
DataContainer, java.io.Externalizable, java.io.Serializable

public abstract class AbstractDataContainer
extends java.lang.Object
implements DataContainer, java.io.Externalizable

AbstractDataContainer is a base class intended to be extended by developers who are writing new data sources. It provides some basic support to make the data source externalizable.

See Also:
Serialized Form

Constructor Summary
protected AbstractDataContainer()
          Default constructor, used for serialization support.
protected AbstractDataContainer(java.lang.String beanId, java.lang.String id)
          Constructor which accepts the id for the data source.
 
Method Summary
 void destroy()
          Called when the data container is going out of scope
 java.lang.String getBeanId()
          The id used to retrieve the data container in the scope.
 java.lang.String getId()
          Return the unique id for this data container
 void readExternal(java.io.ObjectInput in)
           
protected  java.lang.String readUTF(java.io.ObjectInput in)
          Helper method to write a string
 void writeExternal(java.io.ObjectOutput out)
           
protected  void writeUTF(java.io.ObjectOutput out, java.lang.String str)
          Helper method to read a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.xsp.model.DataContainer
deserialize, serialize
 

Constructor Detail

AbstractDataContainer

protected AbstractDataContainer(java.lang.String beanId,
                                java.lang.String id)
Constructor which accepts the id for the data source.

Parameters:
id -

AbstractDataContainer

protected AbstractDataContainer()
Default constructor, used for serialization support.

Method Detail

readUTF

protected java.lang.String readUTF(java.io.ObjectInput in)
                            throws java.io.IOException
Helper method to write a string

Throws:
java.io.IOException

writeUTF

protected void writeUTF(java.io.ObjectOutput out,
                        java.lang.String str)
                 throws java.io.IOException
Helper method to read a string

Throws:
java.io.IOException

getBeanId

public java.lang.String getBeanId()
Description copied from interface: DataContainer
The id used to retrieve the data container in the scope.

Specified by:
getBeanId in interface DataContainer

getId

public java.lang.String getId()
Description copied from interface: DataContainer
Return the unique id for this data container

Specified by:
getId in interface DataContainer
Returns:

destroy

public void destroy()
Description copied from interface: DataContainer
Called when the data container is going out of scope

Specified by:
destroy in interface DataContainer

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException