|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.Externalizer
public abstract class Externalizer
This class manages the externalization of any toolkit objects. Subclasses deal with the particularities of the different elements such as different tags and different references. See also the class "TagInputStream."
Field Summary | |
---|---|
protected long |
numberOfObjects
|
Hashtable |
tagClassTable
|
TagInputStream |
tagInputStream
|
static java.lang.String |
TYPE_CONTEXT
|
static java.lang.String |
TYPE_DATA
|
static java.lang.String |
TYPE_FORMAT
|
static java.lang.String |
TYPE_OPERATION
|
static java.lang.String |
TYPE_PROCESSOR
|
static java.lang.String |
TYPE_SERVICE
|
static java.lang.String |
TYPE_SETTINGS
|
static java.lang.String |
TYPE_TYPE
|
static java.lang.String |
TYPE_UNKNOWN
|
static java.lang.String |
TYPE_VIEW
|
Constructor Summary | |
---|---|
Externalizer()
This constructor creates a Externalizer object. |
|
Externalizer(java.lang.String option,
java.io.BufferedInputStream aIniFile,
java.lang.String kind)
This constructor initializes an Externalizer object. |
|
Externalizer(java.lang.String option,
java.lang.String pathAndFile,
java.lang.String kind)
This constructor creates an Externalizer object. |
|
Externalizer(java.net.URL aURL,
java.lang.String kind)
This constructor creates an Externalizer object that works with SGML code. |
Method Summary | |
---|---|
void |
addEntryInTagClassTable(java.lang.String tagName,
java.lang.String className)
Add an entry in the tag/class table |
void |
clearCacheTable()
This method empties the cache |
java.lang.Object |
convertTagToObject(Tag aTag)
Converts a tag to an Object. |
abstract void |
end()
Abstract method that must be implemented by subclasses to release resources from the Externalizer. |
protected int |
getCachePolicyToApply(Cacheable object)
Checks which of the existing cache policies must be applied in order to insert the passed 'object' into the cache. |
Hashtable |
getCacheTable()
This method returns the objects cache. |
java.util.Enumeration |
getClasses()
Returns the classes that this externalizer can instantiate. |
Cacheable |
getFromCacheTable(java.lang.String key)
Removes an element with id=key from the cache and return it. |
long |
getNumberOfObjects()
Returns the numberOfObjects. |
long |
getObjectsMaxNum()
Returns the objectsMaxNum. |
long |
getObjectsPerTypeMaxNum()
Returns the objectsPerTypeMaxNum. |
long |
getObjectTypesMaxNum()
Returns the objectTypesMaxNum. |
Hashtable |
getTagClassTable()
Returns a Hashtable with the classes that this Externalizer can instantiate. |
TagInputStream |
getTagInputStream()
Returns a special stream that is able to read tags. |
TagOutputStream |
getTagOutputStream()
Returns a special stream that is able to output tags. |
boolean |
isCachingEnabled()
Returns true if element caching is possible. |
static boolean |
isRunTime()
Returns the value of the isRunTime property. |
void |
putIntoCacheTable(Cacheable object)
Places the element 'object' into the cache verifying first if any of the cache bounds is overheaded. |
java.lang.Object |
readObject(int index)
Reads the Object defined by its index in the SGML file owned by the externalizer's stream. |
java.lang.Object |
readObject(java.lang.String aString)
When an application wants to internalize an instance of an Externalizable class, it calls this method. |
Tag |
readTag(int index)
Asks to the tagInputStream for the Tag with a given index. |
protected void |
rebuildCacheTable(int policy,
Cacheable object)
Removes elements from the cache table corresponding to the remove policy to apply. |
void |
setCachingEnabled(boolean newValue)
This method enables or disables the element caching. |
void |
setNumberOfObjects(long numberOfObjects)
Sets the numberOfObjects. |
void |
setObjectsMaxNum(long objectsMaxNum)
Sets the objectsMaxNum. |
void |
setObjectsPerTypeMaxNum(long objectsPerTypeMaxNum)
Sets the objectsPerTypeMaxNum. |
void |
setObjectTypesMaxNum(long objectTypesMaxNum)
Sets the objectTypesMaxNum. |
static void |
setRunTime(boolean aBoolean)
Sets the value of the isRunTime property. |
void |
setTagClassTable(Hashtable aHashtable)
Sets the value of tagClassTable. |
void |
setTagInputStream(TagInputStream aTagInputStream)
Sets the tagInputStream. |
Vector |
tagList()
Returns the tags in the generic operation stream of this externalizer. |
Tag |
tagWithId(java.lang.String aString)
Returns a Tag with an ID in the generic operation stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public TagInputStream tagInputStream
public Hashtable tagClassTable
public static final java.lang.String TYPE_SETTINGS
public static final java.lang.String TYPE_DATA
public static final java.lang.String TYPE_FORMAT
public static final java.lang.String TYPE_SERVICE
public static final java.lang.String TYPE_CONTEXT
public static final java.lang.String TYPE_OPERATION
public static final java.lang.String TYPE_PROCESSOR
public static final java.lang.String TYPE_VIEW
public static final java.lang.String TYPE_TYPE
public static final java.lang.String TYPE_UNKNOWN
protected long numberOfObjects
Constructor Detail |
---|
public Externalizer()
public Externalizer(java.lang.String option, java.io.BufferedInputStream aIniFile, java.lang.String kind) throws java.io.IOException
option
- java.lang.StringaIniFile
- java.io.BufferedInputStream
java.io.IOException
public Externalizer(java.lang.String option, java.lang.String pathAndFile, java.lang.String kind) throws java.io.IOException
option
- java.lang.StringpathAndFile
- java.lang.String
java.io.IOException
public Externalizer(java.net.URL aURL, java.lang.String kind) throws java.io.IOException
aURL
- java.net.URL
java.io.IOException
Method Detail |
---|
public void addEntryInTagClassTable(java.lang.String tagName, java.lang.String className)
tagName
- java.lang.StringclassName
- java.lang.Stringpublic void clearCacheTable()
clearCacheTable
in interface Cache
public java.lang.Object convertTagToObject(Tag aTag) throws java.io.IOException
aTag
- Tag
java.io.IOException
public abstract void end()
public Hashtable getCacheTable()
getCacheTable
in interface Cache
public java.util.Enumeration getClasses()
public Cacheable getFromCacheTable(java.lang.String key) throws java.io.IOException
getFromCacheTable
in interface Cache
key
- java.lang.String object name
java.io.IOException
public Hashtable getTagClassTable()
public TagInputStream getTagInputStream()
public TagOutputStream getTagOutputStream()
public boolean isCachingEnabled()
isCachingEnabled
in interface Cache
public static boolean isRunTime()
protected void rebuildCacheTable(int policy, Cacheable object)
policy
- int policy to applyobject
- com.ibm.btt.Cacheable - Object to put into cache tableprotected int getCachePolicyToApply(Cacheable object)
object
- com.ibm.btt.Cacheable - Object to put into cache table
public void putIntoCacheTable(Cacheable object) throws java.io.IOException
putIntoCacheTable
in interface Cache
java.io.IOException
public java.lang.Object readObject(int index) throws java.io.IOException
java.io.IOException
public java.lang.Object readObject(java.lang.String aString) throws java.io.IOException
aString
- java.lang.String
java.io.IOException
public Tag readTag(int index) throws java.io.IOException
index
- int
java.io.IOException
public void setCachingEnabled(boolean newValue)
setCachingEnabled
in interface Cache
newValue
- booleanpublic static void setRunTime(boolean aBoolean)
aBoolean
- booleanpublic void setTagClassTable(Hashtable aHashtable)
aHashtable
- java.util.Hashtablepublic void setTagInputStream(TagInputStream aTagInputStream)
aTagInputStream
- TagInputStreampublic Vector tagList()
public Tag tagWithId(java.lang.String aString) throws java.io.IOException
aString
- java.lang.String
java.io.IOException.
java.io.IOException
public long getObjectsMaxNum()
public long getObjectsPerTypeMaxNum()
public long getObjectTypesMaxNum()
public void setObjectsMaxNum(long objectsMaxNum)
objectsMaxNum
- - The objectsMaxNum to setpublic void setObjectsPerTypeMaxNum(long objectsPerTypeMaxNum)
objectsPerTypeMaxNum
- - The objectsPerTypeMaxNum to setpublic void setObjectTypesMaxNum(long objectTypesMaxNum)
objectTypesMaxNum
- - The objectTypesMaxNum to setpublic long getNumberOfObjects()
public void setNumberOfObjects(long numberOfObjects)
numberOfObjects
- - The numberOfObjects to set
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |