public abstract class DataCacheObject extends CacheObject implements java.lang.Runnable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected static int |
CACHE_BUSY
Description of the Field
|
protected static int |
CACHE_COMPLETE
Description of the Field
|
protected static int |
CACHE_EMPTY
Description of the Field
|
protected static int |
CACHE_ERROR
Description of the Field
|
_attributes, _lsid, _name, _semanticTypes
Constructor and Description |
---|
DataCacheObject()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(DataCacheListener aListener)
Add a listenero
|
void |
clear()
Clear the dat from this cache item
|
abstract int |
doWork()
Abstract method for actually getting the data while in the thread
|
java.lang.String |
getAbsoluteFileName() |
java.lang.String |
getBaseFileName() |
java.util.Date |
getCreatedDate() |
java.io.InputStream |
getDataInputStream()
Return the data as an InputStream.
|
java.io.File |
getFile() |
java.lang.Object |
getObject()
return the java object associated with this CacheObject
|
java.lang.String |
getResourceName() |
protected int |
getStatus() |
boolean |
isBusy()
Returns whether it is busy getting the data
|
boolean |
isEmpty()
Returns whether it is in empty state
|
boolean |
isError()
Returns whether it is in error state
|
boolean |
isReady()
Return the status of getting the data
|
void |
notifyListeners()
Notifies the listener that the "getting" of the data has completed
|
void |
refresh(DataCacheListener aListener)
Refreshes the data from the original source
|
void |
removeAllListeners()
Removes all the listeners
|
void |
removeListener(DataCacheListener aListener)
Removes a listener
|
void |
reset()
Description of the Method
|
void |
run() |
void |
setAbsoluteFileName(java.lang.String localFileName) |
void |
setBaseFileName(java.lang.String localFileName) |
void |
setCreatedDate(java.util.Date createdDate) |
void |
setResourceName(java.lang.String resourceName) |
void |
start()
Description of the Method
|
void |
stop() |
java.lang.String |
toString()
return a string representation of this datacacheobject
|
addAttribute, getAttribute, getAttributeNames, getLSID, getName, getSemanticTypes, objectAdded, objectPurged, objectRemoved, removeAttribute, setLSID, setName, setSemanticTypes
protected static final int CACHE_BUSY
protected static final int CACHE_ERROR
protected static final int CACHE_COMPLETE
protected static final int CACHE_EMPTY
public DataCacheObject()
public final void setCreatedDate(java.util.Date createdDate)
createdDate
- The mCreatedDate to set.public final void setAbsoluteFileName(java.lang.String localFileName)
localFileName
- The mLocalFileName to set.public final void setBaseFileName(java.lang.String localFileName)
localFileName
- The mLocalFileName to set.public final void setResourceName(java.lang.String resourceName)
resourceName
- The mResourceName to set.public final java.lang.Object getObject()
CacheObject
getObject
in interface CacheObjectInterface
getObject
in class CacheObject
public final java.io.File getFile()
public final java.io.InputStream getDataInputStream()
public final boolean isEmpty()
public final boolean isReady()
public final boolean isBusy()
public final boolean isError()
public final java.util.Date getCreatedDate()
public final java.lang.String getAbsoluteFileName()
public final java.lang.String getBaseFileName()
public final java.lang.String getResourceName()
protected final int getStatus()
public final void addListener(DataCacheListener aListener)
aListener
- the listener to addpublic final void removeListener(DataCacheListener aListener)
aListener
- the listener to removepublic final void removeAllListeners()
public final void notifyListeners()
public final void refresh(DataCacheListener aListener)
aListener
- public final void reset()
public final void clear()
public abstract int doWork()
public java.lang.String toString()
toString
in class java.lang.Object
public void start()
public void stop()
public void run()
run
in interface java.lang.Runnable