|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.ucsb.adl.middleware.Global
Stores global quantities and performs global initializations. In the context of the middleware, "global" means pertaining to a middleware instance as a whole; a middleware "instance" is represented by an instance of this class and zero or more instances of service classes, all of which are tied to the same root middleware configuration file. Use of this class allows multiple middleware instances to run simultaneously in the same Java VM.
All middleware service objects maintain a reference to the global object representing the services' middleware instance.
This class also performs certain one-time initializations.
This class reads the following properties from main middleware
configuration files. Property values may be indirectly specified
using the notation @P where P is the
name of another property (see ExtendedProperties for more
information).
jython.home
/Lib. This property is read only
once.
jython.cachedir
jython.home. As a special case, if the
value of this property has the form
"SYSTEM_PROPERTY(S)" (e.g.,
"SYSTEM_PROPERTY(java.io.tmpdir)"), the value of Java
system property S is used. This property is read only
once.
jython.module_path
../modules:/otherdir/lib". The pathlist is appended
to Jython's python.path registry variable.
Directories that are not absolute are interpreted relative to the
directory containing the main middleware configuration file.
jython.class_path
../classes". Directories that are not absolute are
interpreted relative to the directory containing the main
middleware configuration file.
jython.jar_path
../lib".
Directories that are not absolute are interpreted relative to the
directory containing the main middleware configuration file.
$Log: Global.java,v $
Revision 1.5 2006/06/22 19:14:54 gjanee
Added method getConfigurationFile.
Revision 1.4 2004/09/21 23:53:43 gjanee
Minor documentation change.
Revision 1.3 2004/09/14 21:11:24 gjanee
Added the Jython initializations formerly performed by class
edu.ucsb.adl.bucket99.PythonQueryTranslator. Added
properties jython.module_path,
jython.class_path, and jython.jar_path.
Revision 1.2 2004/03/09 05:50:00 gjanee
Added Jython initialization. Added properties
jython.home and jython.cachedir.
Revision 1.1 2004/03/04 00:43:42 gjanee
Initial revision
| Method Summary | |
static edu.ucsb.adl.middleware.Global |
createGlobal(java.lang.String configurationFile)
Creates a Global object representing a middleware
instance. |
void |
destroy()
Decrements the reference count. |
java.lang.String |
getConfigurationFile()
Returns the name of the main middleware configuration file associated with this Global object. |
java.util.Hashtable |
getHashtableVariable(java.lang.String name)
Returns the value of a global variable that is a Hashtable. |
java.lang.Object |
getVariable(java.lang.String name)
Returns the value of a global variable. |
java.util.Vector |
getVectorVariable(java.lang.String name)
Returns the value of a global variable that is a Vector. |
void |
putVariable(java.lang.String name,
java.lang.Object value)
Sets the value of a global variable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static edu.ucsb.adl.middleware.Global createGlobal(java.lang.String configurationFile)
throws InternalErrorException
Global object representing a middleware
instance. If an object already exists for the configuration
file, i.e., if the middleware instance already exists, the
extant object's reference count is incremented and it is
returned instead.
configurationFile - The filename of a main middleware configuration file.
InternalErrorException - If any global or one-time initializations fail.public java.lang.String getConfigurationFile()
Global object.
public java.lang.Object getVariable(java.lang.String name)
edu.ucsb.adl.middleware.RankingAccumulator:rankers".
Also by convention, a class may set and retrieve values only
for global variables it owns.
name - The variable name.
null if not assigned.public java.util.Hashtable getHashtableVariable(java.lang.String name)
Hashtable. If the variable has not been assigned,
it is assigned an empty Hashtable, which is then
returned.
By convention, global variable names are prefixed with the
fully-qualified name of the owning class and a colon, e.g.,
"edu.ucsb.adl.middleware.RankingAccumulator:rankers".
Also by convention, a class may set and retrieve values only
for global variables it owns.
name - The variable name.
public java.util.Vector getVectorVariable(java.lang.String name)
Vector. If the variable has not been assigned, it
is assigned an empty Vector, which is then
returned.
By convention, global variable names are prefixed with the
fully-qualified name of the owning class and a colon, e.g.,
"edu.ucsb.adl.middleware.RankingAccumulator:rankers".
Also by convention, a class may set and retrieve values only
for global variables it owns.
name - The variable name.
public void putVariable(java.lang.String name,
java.lang.Object value)
edu.ucsb.adl.middleware.RankingAccumulator:rankers".
Also by convention, a class may set and retrieve values only
for global variables it owns.
name - The variable name.value - The variable's value.public void destroy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||