|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--arlut.csd.ganymede.Ganymede
This class is the main server module, providing the static main() method executed to start the server. This class is never instantiated, but instead provides a bunch of static variables and convenience methods in addition to the main() start method.
When started, the Ganymede server creates a
DBStore object, which in turn
creates and loads a set of DBObjectBase
objects, one for each type of object held in the ganymede.db file. Each
DBObjectBase contains DBObject
objects which hold the DBField's
which ultimately hold the actual data from the database.
The ganymede.db file may define a number of task classes that are to
be run by the server at defined times. The server's main() method starts
a background GanymedeScheduler
thread to handle background tasks.
When the database has been loaded from disk, the main() method
creates a GanymedeServer
object. GanymedeServer implements the Server RMI remote interface, and is published in the RMI registry.
Clients and admin consoles may then connect to the published GanymedeServer object via RMI to establish a connection to the server.
The GanymedeServer's login
method is used to create a GanymedeSession
object to manage permissions and communications with an individual client. The
client communicates with the GanymedeSession object through the
Session RMI remote interface.
While the GanymedeServer's login method is used to handle client connections,
the GanymedeServer's
admin
method is used to create a GanymedeAdmin object
to handle the admin console's communications with the server. The admin
console communicates with the GanymedeAdmin object through the
adminSession RMI remote interface.
Most of the server's database logic is handled by the DBStore object
and its related classes (DBObject,
DBEditSet, DBNameSpace,
and DBJournal).
All client permissions and communications are handled by the GanymedeSession class.
| Field Summary | |
static BaseListTransport |
baseTransport
A cached reference to a master base list serialization object. |
static java.util.Vector |
builderTasks
A vector of GanymedeBuilderTask
objects initialized on database load. |
static CategoryTransport |
catTransport
A cached reference to a master category tree serialization object. |
static DBStore |
db
The Ganymede object store. |
static java.lang.String |
dbFilename
|
static boolean |
debug
|
static java.lang.String |
debugFilename
If the server is started with debug=<filename> on the command line, debugFilename will hold the name of the file to write our RMI debug log to. |
static java.lang.String |
defaultmonitorpassProperty
|
static java.lang.String |
defaultrootpassProperty
|
static boolean |
firstrun
This flag is true if the server was started with no pre-existing ganymede.db file. |
static java.lang.String |
helpbaseProperty
|
static java.lang.String |
htmlProperty
|
static GanymedeSession |
internalSession
A number of operations in the Ganymede server require 'root' access to the database. |
static java.lang.String |
journalProperty
|
static DBLog |
log
This object provides access to the Ganymede log file, providing logging, email, and search services. |
static boolean |
logErrorDialogs
If true, Ganymede.createErrorDialog() will print the content of error dialogs to the server's stderr. |
static java.lang.String |
logHelperProperty
|
static java.lang.String |
logProperty
|
static java.lang.String |
mailHostProperty
|
static java.lang.String |
messageDirectoryProperty
|
static java.lang.String |
monitornameProperty
|
static int |
registryPortProperty
|
static boolean |
remotelyAccessible
If true, GanymedeSession
will export any objects being viewed, edited, or created before
returning it to the client. |
static boolean |
resetadmin
If the server is started with the -resetadmin command line flag, this field will be set to true and the server's startupHook() will reset the supergash password to that specified in the server's ganymede.properties file. |
static java.lang.String |
returnaddrProperty
|
static java.lang.String |
rootname
|
static GanymedeScheduler |
scheduler
The background task scheduler. |
static java.lang.String |
schemaDirectoryProperty
|
static GanymedeServer |
server
Once the server is started and able to accept RMI clients, this field will hold the GanymedeServer object which clients talk to in order to login to the server. |
static java.lang.String |
serverHostProperty
|
static java.lang.String |
signatureFileProperty
|
static boolean |
softtimeout
|
static java.util.Date |
startTime
We keep the server's start time for display in the admin console. |
static int |
timeoutIdleNoObjs
|
static int |
timeoutIdleWithObjs
|
| Constructor Summary | |
Ganymede()
|
|
| Method Summary | |
static ReturnVal |
createErrorDialog(java.lang.String title,
java.lang.String body)
This is a convenience method used by the server to return a standard error dialog. |
static ReturnVal |
createInfoDialog(java.lang.String title,
java.lang.String body)
This is a convenience method used by the server to return a standard informative dialog. |
static void |
debug(java.lang.String string)
This is a convenience method used by server-side code to send debug output to stdout and to any attached admin consoles. |
static GanymedeServer |
directInit(java.lang.String dbFilename)
This method is used to initialize the Ganymede system when it is being driven by a direct-linked loader main() entry point, as a single process. |
(package private) static void |
forceBuilderTasks()
This method schedules all registered builder tasks for execution, with an option set that will cause all builder tasks to consider object bases as changed since the last build, thus triggering a full external rebuild. |
static boolean |
loadProperties(java.lang.String filename)
This method loads properties from the ganymede.properties file. |
static void |
main(java.lang.String[] argv)
The Ganymede server start point. |
(package private) static void |
registerBuilderTask(java.lang.String taskName)
|
private static void |
registerTasks()
This method scans the database for valid BuilderTask entries and adds them to the builderTasks vector. |
(package private) static void |
runBuilderTasks()
This method schedules all registered builder tasks for execution. |
static java.lang.String |
stackTrace(java.lang.Throwable thing)
This is a convenience method used by the server to get a stack trace from a throwable object in String form. |
static void |
startupHook()
This method is provided to allow us to hook in creation of new objects with specified invid's that the server code references. |
(package private) static void |
unregisterBuilderTask(java.lang.String taskName)
|
(package private) static void |
updateBuildStatus()
This method is called by the GanymedeBuilderTask base class to record that the server is processing a build. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static boolean debug
public static boolean logErrorDialogs
If true, Ganymede.createErrorDialog() will print the content of error dialogs to the server's stderr.
public static java.util.Date startTime
We keep the server's start time for display in the admin console.
public static java.lang.String debugFilename
If the server is started with debug=<filename> on the command line, debugFilename will hold the name of the file to write our RMI debug log to.
public static boolean remotelyAccessible
If true, GanymedeSession
will export any objects being viewed, edited, or created before
returning it to the client. This will be false during direct
loading, which should double load speed.
public static GanymedeServer server
Once the server is started and able to accept RMI clients, this field will hold the GanymedeServer object which clients talk to in order to login to the server.
public static GanymedeSession internalSession
A number of operations in the Ganymede server require 'root' access to the database. This GanymedeSession object is provided for system database operations.
public static GanymedeScheduler scheduler
The background task scheduler.
public static DBStore db
public static DBLog log
This object provides access to the Ganymede log file, providing logging, email, and search services.
public static CategoryTransport catTransport
A cached reference to a master category tree serialization
object. Initialized the first time a user logs on to the server,
and re-initialized when the schema is edited. This object is
provided to clients when they call
GanymedeSession.getCategoryTree().
public static BaseListTransport baseTransport
A cached reference to a master base list serialization object.
Initialized on server start up and re-initialized when the schema
is edited. This object is provided to clients when they call
GanymedeSession.getBaseList().
public static java.util.Vector builderTasks
A vector of GanymedeBuilderTask
objects initialized on database load.
public static java.lang.String dbFilename
public static java.lang.String journalProperty
public static java.lang.String logProperty
public static java.lang.String htmlProperty
public static java.lang.String serverHostProperty
public static java.lang.String rootname
public static java.lang.String defaultrootpassProperty
public static java.lang.String mailHostProperty
public static java.lang.String returnaddrProperty
public static java.lang.String signatureFileProperty
public static java.lang.String helpbaseProperty
public static java.lang.String monitornameProperty
public static java.lang.String defaultmonitorpassProperty
public static java.lang.String messageDirectoryProperty
public static java.lang.String schemaDirectoryProperty
public static int registryPortProperty
public static java.lang.String logHelperProperty
public static boolean softtimeout
public static int timeoutIdleNoObjs
public static int timeoutIdleWithObjs
public static boolean resetadmin
If the server is started with the -resetadmin command line flag, this field will be set to true and the server's startupHook() will reset the supergash password to that specified in the server's ganymede.properties file.
public static boolean firstrun
This flag is true if the server was started with no
pre-existing ganymede.db file. This will be true when the server
code is run from a schema kit's runDirectLoader script. If true,
the GanymedeSession
class will not worry about not finding the default permissions
role in the database.
| Constructor Detail |
public Ganymede()
| Method Detail |
public static void main(java.lang.String[] argv)
public static GanymedeServer directInit(java.lang.String dbFilename)
This method is used to initialize the Ganymede system when it is being driven by a direct-linked loader main() entry point, as a single process. This method is not used when the server is started up normally.
public static void debug(java.lang.String string)
public static java.lang.String stackTrace(java.lang.Throwable thing)
public static ReturnVal createInfoDialog(java.lang.String title,
java.lang.String body)
public static ReturnVal createErrorDialog(java.lang.String title,
java.lang.String body)
public static void startupHook()
This method is provided to allow us to hook in creation of new objects with specified invid's that the server code references.
It's intended for use during server development as we evolve the schema.
private static void registerTasks()
static void registerBuilderTask(java.lang.String taskName)
static void unregisterBuilderTask(java.lang.String taskName)
static void runBuilderTasks()
static void forceBuilderTasks()
static void updateBuildStatus()
public static boolean loadProperties(java.lang.String filename)
This method loads properties from the ganymede.properties file.
This method is public so that loader code linked with the Ganymede server code can initialize the properties without going through Ganymede.main().
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||