|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.lang.Thread
|
+--arlut.csd.ganymede.client.Loader
Client-side thread class for loading object and field type definitions from the server in the background during the client's start-up.
| Field Summary | |
private java.util.Hashtable |
baseHash
|
private boolean |
baseHashLoaded
|
private java.util.Vector |
baseList
|
private boolean |
baseListLoaded
|
private java.util.Hashtable |
baseMap
|
private boolean |
baseMapLoaded
|
private java.util.Hashtable |
baseNames
|
private boolean |
baseNamesLoaded
|
private java.util.Hashtable |
baseToShort
|
private boolean |
debug
|
private boolean |
keepGoing
|
private java.util.Hashtable |
nameShorts
|
private Session |
session
|
private java.util.Hashtable |
templateHash
Hash mapping Short object type id's to Vectors of FieldTemplate's,
used by the client to quickly look up information about fields
in order to populate
containerPanel's. |
private boolean |
templateLoading
|
private java.util.Hashtable |
templateNameHash
Hash mapping Short object type id's to a Hash that maps field name to FieldTemplate
object |
| Fields inherited from class java.lang.Thread |
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ |
| Constructor Summary | |
Loader(Session session,
boolean debug)
|
|
| Method Summary | |
void |
cleanUp()
Clear out all information in the loader |
void |
clear()
Clear out all the information in the loader, and spawn a new loader thread to download new information from the server. |
private void |
constructTemplateNameHash(java.lang.Short objectId,
java.util.Vector fieldTemplates)
|
java.util.Vector |
getBaseList()
Returns a Vector of BaseDump objects,
providing a local cache of Base
references that the client consults during operations. |
java.util.Hashtable |
getBaseMap()
Returns a hash mapping Short Base id's to
BaseDump objects. |
java.util.Hashtable |
getBaseNames()
Returns a hash mapping BaseDump
references to their title. |
java.util.Hashtable |
getBaseToShort()
Returns a hashtable mapping BaseDump
references to their object type id in Short form. |
FieldTemplate |
getFieldTemplate(short objectid,
java.lang.String fieldname)
Returns a FieldTemplate
for a field specified by object type id and field name. |
FieldTemplate |
getFieldTemplate(java.lang.Short objectid,
java.lang.String fieldname)
Returns a FieldTemplate
for a field specified by object type id and field name. |
java.util.Hashtable |
getNameToShort()
Returns a hashtable mapping base names to their object type id in Short form. |
java.lang.String |
getObjectType(Invid objId)
Returns the type name for a given object. |
java.util.Vector |
getTemplateVector(short id)
Returns a vector of FieldTemplate's. |
java.util.Vector |
getTemplateVector(java.lang.Short id)
Returns a vector of FieldTemplate's
listing fields and field informaton for the object type identified by
id. |
private void |
loadBaseHash()
loadBaseHash is used to prepare a hash table mapping Bases to Vector's of BaseField.. |
private void |
loadBaseList()
loadBaseList gets the list of types from the server. |
private void |
loadBaseMap()
loadBaseMap() generates baseMap, a mapping of Short's to the corresponding remote base reference. |
private void |
loadBaseNames()
loadBaseNames constructs a hashtable mapping Base references to base names. |
void |
run()
|
| Methods inherited from class java.lang.Thread |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private boolean debug
private java.util.Hashtable baseMap
private java.util.Hashtable baseNames
private java.util.Hashtable baseHash
private java.util.Hashtable baseToShort
private java.util.Hashtable nameShorts
private java.util.Vector baseList
private boolean keepGoing
private boolean baseNamesLoaded
private boolean baseListLoaded
private boolean baseMapLoaded
private boolean templateLoading
private boolean baseHashLoaded
private Session session
private java.util.Hashtable templateHash
Hash mapping Short object type id's to Vectors of
FieldTemplate's,
used by the client to quickly look up information about fields
in order to populate
containerPanel's.
This hash is used by
getTemplateVector.
private java.util.Hashtable templateNameHash
Hash mapping Short object type id's to a Hash that
maps field name to FieldTemplate
object
| Constructor Detail |
public Loader(Session session,
boolean debug)
| Method Detail |
public void run()
run in class java.lang.Threadpublic void clear()
public void cleanUp()
Clear out all information in the loader
public java.lang.String getObjectType(Invid objId)
Returns the type name for a given object.
If the loader thread hasn't yet downloaded that information, this method will block until the information is available.
public java.util.Vector getBaseList()
Returns a Vector of BaseDump objects,
providing a local cache of Base
references that the client consults during operations.
If this thread hasn't yet downloaded that information, this method will block until the information is available.
public java.util.Hashtable getBaseNames()
Returns a hash mapping BaseDump
references to their title.
If this thread hasn't yet downloaded that information, this method will block until the information is available.
public java.util.Hashtable getBaseMap()
Returns a hash mapping Short Base id's to
BaseDump objects.
If this thread hasn't yet downloaded that information, this method will block until the information is available.
public java.util.Hashtable getBaseToShort()
Returns a hashtable mapping BaseDump
references to their object type id in Short form. This is
a holdover from a time when the client didn't create local copies
of the server's Base references.
If this thread hasn't yet downloaded that information, this method will block until the information is available.
public java.util.Hashtable getNameToShort()
Returns a hashtable mapping base names to their object type id in Short form. This is used by the XML client to quickly map object type names to the numeric type id.
If this thread hasn't yet downloaded that information, this method will block until the information is available.
public FieldTemplate getFieldTemplate(short objectid,
java.lang.String fieldname)
Returns a FieldTemplate
for a field specified by object type id and field name.
public FieldTemplate getFieldTemplate(java.lang.Short objectid,
java.lang.String fieldname)
Returns a FieldTemplate
for a field specified by object type id and field name.
public java.util.Vector getTemplateVector(short id)
Returns a vector of
FieldTemplate's.
id - Object type id to retrieve field information for.public java.util.Vector getTemplateVector(java.lang.Short id)
Returns a vector of
FieldTemplate's
listing fields and field informaton for the object type identified by
id.
id - The id number of the object type to be returned the base id.
private void constructTemplateNameHash(java.lang.Short objectId,
java.util.Vector fieldTemplates)
private void loadBaseList()
throws java.rmi.RemoteException
private void loadBaseNames()
throws java.rmi.RemoteException
private void loadBaseHash()
throws java.rmi.RemoteException
private void loadBaseMap()
throws java.rmi.RemoteException
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||