com.ibm.dse.base
Class ServiceExternalizer

java.lang.Object
  |
  +--com.ibm.dse.base.Externalizer
        |
        +--com.ibm.dse.base.ServiceExternalizer

public class ServiceExternalizer
extends Externalizer


Fields inherited from class com.ibm.dse.base.Externalizer
tagClassTable, tagInputStream, TYPE_CONTEXT, TYPE_DATA, TYPE_FORMAT, TYPE_OPERATION, TYPE_PROCESSOR, TYPE_SERVICE, TYPE_SETTINGS, TYPE_TYPE, TYPE_UNKNOWN, TYPE_VIEW
 
Constructor Summary
ServiceExternalizer()
          ServiceExternalizer default constructor.
ServiceExternalizer(java.lang.String option, java.io.BufferedInputStream aIniStream)
          This constructor initializes an Externalizer object.
ServiceExternalizer(java.lang.String option, java.lang.String pathAndFile)
          This constructor initializes an Externalizer object.
 
Method Summary
protected  Externalizer createNewExternalizer()
          Returns a new externalizer for the generic service file.
 void end()
          Releases resources from this externalizer
 void makeTagClassTable()
          Creates a tagClassTable with the values in the DSE.INI file (path is settings.tags.services).
 void reset()
          Sets a new service externalizer to Service.
 void reset(java.util.Enumeration listTagId)
          Resets the definition of tags which tag id appears in listTagId.
 void reset(java.lang.String tagId)
          Resets the definition of the tag with id tagId.
protected  void reset(java.lang.String tagId, TagInputStream aTagInputStream)
          Resets the definition of the service entity with id equals to tagId.
 
Methods inherited from class com.ibm.dse.base.Externalizer
convertTagToObject, getClasses, getTagClassTable, getTagInputStream, getTagOutputStream, isRunTime, readObject, readObject, readTag, setRunTime, setTagClassTable, setTagInputStream, tagList, tagWithId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceExternalizer

public ServiceExternalizer()
ServiceExternalizer default constructor.

ServiceExternalizer

public ServiceExternalizer(java.lang.String option,
                           java.io.BufferedInputStream aIniStream)
                    throws java.io.IOException
This constructor initializes an Externalizer object. The option parameter should be Memory" or File. Memory indicates that all tags are to be stored in memory. This is the recommended option for small tag files. File indicates that the tag file is read each time a tag is needed. This is the recommended option for large tag files.
Parameters:
option - java.lang.String
aIniStream - java.io.BufferedInputStream containing the input data

ServiceExternalizer

public ServiceExternalizer(java.lang.String option,
                           java.lang.String pathAndFile)
                    throws java.io.IOException
This constructor initializes an Externalizer object. The option parameter should be Memory" or File. Memory indicates that all tags are to be stored in memory. This is the recommended option for small tag files. File indicates that the tag file is read each time a tag is needed. This is the recommended option for large tag files.
Parameters:
option - java.lang.String
pathAndFile - java.lang.String specifying the name and path of the formats definition file
Method Detail

createNewExternalizer

protected Externalizer createNewExternalizer()
                                      throws java.io.IOException,
                                             DSEObjectNotFoundException
Returns a new externalizer for the generic service file.
Returns:
com.ibm.dse.base.Externalizer
Throws:
java.io.IOException -  
DSEObjectNotFoundException -  

end

public void end()
Releases resources from this externalizer
Overrides:
end in class Externalizer

makeTagClassTable

public void makeTagClassTable()
Creates a tagClassTable with the values in the DSE.INI file (path is settings.tags.services).
Overrides:
makeTagClassTable in class Externalizer

reset

public void reset()
           throws java.io.IOException,
                  DSEObjectNotFoundException
Sets a new service externalizer to Service.
Throws:
java.io.IOException -  
DSEObjectNotFoundException -  

reset

public void reset(java.lang.String tagId)
           throws java.io.IOException,
                  DSEObjectNotFoundException
Resets the definition of the tag with id tagId. The new definition is read from the file associated with this externalizer. If the tag doesn't exist in the file but exists in memory then memory definition is deleted. If the tag doesn't exist neither in the file nor in memory then an exception is thrown. If the tag exists in the file but doesn't exist in memory then the new definition is added to memory. If the tag exists both in the file and in memory then the memory definition is updated with the file definition.
Parameters:
tagId - java.lang.String The id of the tag to reset.
Throws:
java.io.IOException -  
DSEObjectNotFoundException -  

reset

protected void reset(java.lang.String tagId,
                     TagInputStream aTagInputStream)
              throws java.io.IOException
Resets the definition of the service entity with id equals to tagId. The new definition is obtained from the TagInputStream passed by parameter. If the tag doesn't exist in the TagInputStream but exists in memory then memory definition is deleted. If the tag doesn't exist neither in the TagInputStream nor in memory then an exception is thrown. If the tag exists in the TagInputStream but doesn't exist in memory then the new definition is added to memory. If the tag exists both in the TagInputStream and in memory then the memory definition is updated with the TagInputStream definition.
Parameters:
tagId - java.lang.String
aTagInputStream - com.ibm.dse.base.TagInputStream
Throws:
java.io.IOException -  

reset

public void reset(java.util.Enumeration listTagId)
           throws java.io.IOException,
                  DSEObjectNotFoundException
Resets the definition of tags which tag id appears in listTagId. The new definition are read from the file associated with this externalizer. If the tag doesn't exist in the file but exists in memory then memory definition is deleted. If the tag doesn't exist neither in the file nor in memory then an exception is thrown. If the tag exists in the file but doesn't exist in memory then the new definition is added to memory. If the tag exists both in the file and in memory then the memory definition is updated with the file definition.
Parameters:
listTagId - java.util.Enumeration
Throws:
java.io.IOException -  
DSEObjectNotFoundException -