arlut.csd.ganymede
Class iAdmin

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--arlut.csd.ganymede.iAdmin
All Implemented Interfaces:
Admin, java.rmi.Remote, java.io.Serializable

class iAdmin
extends java.rmi.server.UnicastRemoteObject
implements Admin

RMI communications class for the admin console. Handles login and update duties for GASHAdmin.

See Also:
Serialized Form

Field Summary
private  java.lang.String adminName
           
private  java.lang.String adminPass
           
private  adminSession aSession
           
(package private) static boolean debug
           
private  GASHAdminFrame frame
           
private  StringDialog permDialog
           
private  Server server
           
(package private)  java.util.Date serverStart
           
private  java.util.Vector tasksKnown
           
private  boolean tasksLoaded
           
 
Fields inherited from class java.rmi.server.UnicastRemoteObject
csf, port, portFactoryParamTypes, portParamTypes, serialVersionUID, ssf
 
Fields inherited from class java.rmi.server.RemoteServer
log, logname
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
iAdmin(Server server, java.lang.String name, java.lang.String pass)
           
 
Method Summary
 void changeAdmins(java.lang.String adminStatus)
          This method is remotely called by the Ganymede server to update the number of admin consoles attached to the server.
 void changeState(java.lang.String state)
          This method is remotely called by the Ganymede server to update the admin console's server state display.
 void changeStatus(java.lang.String status)
          This method is remotely called by the Ganymede server to add to the admin console's log display.
 void changeTasks(java.util.Vector tasks)
          This method is remotely called by the Ganymede server to update the admin console's task table.
 void changeUsers(java.util.Vector entries)
          This method is remotely called by the Ganymede server to update the admin console's connected user table.
(package private)  void disableTask(java.lang.String taskName)
           
 void disconnect()
           
(package private)  void dumpDB()
           
(package private)  void enableTask(java.lang.String taskName)
           
 void forceBuild()
          This method is called by admin console code to force a complete rebuild of all external builds.
 void forceDisconnect(java.lang.String reason)
          Callback: The server can tell us to disconnect if the server is going down.
private  StringDialog getDialog()
           
 java.lang.String getName()
          This method is remotely called by the Ganymede server to obtain the username given when the admin console was started.
 java.lang.String getPassword()
          This method is remotely called by the Ganymede server to obtain the password given when the admin console was started.
 ReturnVal handleReturnVal(ReturnVal retVal)
          This method takes a ReturnVal object from the server and, if necessary, runs through a wizard interaction sequence, possibly displaying several dialogs before finally returning a final result code.
(package private)  void kill(java.lang.String username)
           
(package private)  void killAll()
           
(package private)  void pullSchema()
           
(package private)  void refreshMe()
           
(package private)  void runEmbeddedSweep()
           
(package private)  void runEmbeddedTest()
           
(package private)  void runInvidSweep()
           
(package private)  void runInvidTest()
           
(package private)  void runTaskNow(java.lang.String taskName)
           
 void setFrame(GASHAdminFrame f)
           
 void setLastDumpTime(java.util.Date date)
          This method is remotely called by the Ganymede server to set the last dump date in the admin console.
 void setLocksHeld(int locks)
          This method is remotely called by the Ganymede server to set the number of locks held in the admin console.
 void setMemoryState(long freeMemory, long totalMemory)
          This method is remotely called by the Ganymede server to update the memory statistics display in the admin console.
 void setObjectsCheckedOut(int objs)
          This method is remotely called by the Ganymede server to set the number of objects checked out in the admin console.
 void setServerStart(java.util.Date date)
          This method is remotely called by the Ganymede server to set the server start date in the admin console.
 void setTransactionsInJournal(int trans)
          This method is remotely called by the Ganymede server to set the number of transactions in the server's journal in the admin console.
(package private)  boolean shutdown(boolean waitForUsers)
           
(package private)  void stopTask(java.lang.String taskName)
           
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
, clone, exportObject, exportObject, exportObject, exportObject, readObject, reexport, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub, writeObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

debug

static final boolean debug

frame

private GASHAdminFrame frame

server

private Server server

aSession

private adminSession aSession

adminName

private java.lang.String adminName

adminPass

private java.lang.String adminPass

permDialog

private StringDialog permDialog

tasksLoaded

private boolean tasksLoaded

tasksKnown

private java.util.Vector tasksKnown

serverStart

java.util.Date serverStart
Constructor Detail

iAdmin

public iAdmin(Server server,
              java.lang.String name,
              java.lang.String pass)
       throws java.rmi.RemoteException
Method Detail

getDialog

private StringDialog getDialog()

setFrame

public void setFrame(GASHAdminFrame f)

getName

public java.lang.String getName()

This method is remotely called by the Ganymede server to obtain the username given when the admin console was started.

Specified by:
getName in interface Admin

getPassword

public java.lang.String getPassword()

This method is remotely called by the Ganymede server to obtain the password given when the admin console was started.

Specified by:
getPassword in interface Admin

setServerStart

public void setServerStart(java.util.Date date)

This method is remotely called by the Ganymede server to set the server start date in the admin console.

Specified by:
setServerStart in interface Admin

setLastDumpTime

public void setLastDumpTime(java.util.Date date)

This method is remotely called by the Ganymede server to set the last dump date in the admin console.

Specified by:
setLastDumpTime in interface Admin

setTransactionsInJournal

public void setTransactionsInJournal(int trans)

This method is remotely called by the Ganymede server to set the number of transactions in the server's journal in the admin console.

Specified by:
setTransactionsInJournal in interface Admin

setObjectsCheckedOut

public void setObjectsCheckedOut(int objs)

This method is remotely called by the Ganymede server to set the number of objects checked out in the admin console.

Specified by:
setObjectsCheckedOut in interface Admin

setLocksHeld

public void setLocksHeld(int locks)

This method is remotely called by the Ganymede server to set the number of locks held in the admin console.

Specified by:
setLocksHeld in interface Admin

setMemoryState

public void setMemoryState(long freeMemory,
                           long totalMemory)

This method is remotely called by the Ganymede server to update the memory statistics display in the admin console.

Specified by:
setMemoryState in interface Admin

changeStatus

public void changeStatus(java.lang.String status)

This method is remotely called by the Ganymede server to add to the admin console's log display.

Specified by:
changeStatus in interface Admin
Parameters:
status - A string to add to the console's log display, with the trailing newline included.

changeAdmins

public void changeAdmins(java.lang.String adminStatus)

This method is remotely called by the Ganymede server to update the number of admin consoles attached to the server.

Specified by:
changeAdmins in interface Admin

changeState

public void changeState(java.lang.String state)

This method is remotely called by the Ganymede server to update the admin console's server state display.

Specified by:
changeState in interface Admin

changeUsers

public void changeUsers(java.util.Vector entries)

This method is remotely called by the Ganymede server to update the admin console's connected user table.

Specified by:
changeUsers in interface Admin
Parameters:
entries - a Vector of AdminEntry login description objects.

changeTasks

public void changeTasks(java.util.Vector tasks)

This method is remotely called by the Ganymede server to update the admin console's task table.

Specified by:
changeTasks in interface Admin
Parameters:
tasks - a Vector of scheduleHandle objects describing the tasks registered in the Ganymede server.

forceBuild

public void forceBuild()
                throws java.rmi.RemoteException

This method is called by admin console code to force a complete rebuild of all external builds. This means that all databases will have their last modification timestamp cleared and all builder tasks will be scheduled for immediate execution.


disconnect

public void disconnect()
                throws java.rmi.RemoteException

forceDisconnect

public void forceDisconnect(java.lang.String reason)
Callback: The server can tell us to disconnect if the server is going down.
Specified by:
forceDisconnect in interface Admin

refreshMe

void refreshMe()
         throws java.rmi.RemoteException

kill

void kill(java.lang.String username)
    throws java.rmi.RemoteException

runTaskNow

void runTaskNow(java.lang.String taskName)
          throws java.rmi.RemoteException

stopTask

void stopTask(java.lang.String taskName)
        throws java.rmi.RemoteException

disableTask

void disableTask(java.lang.String taskName)
           throws java.rmi.RemoteException

enableTask

void enableTask(java.lang.String taskName)
          throws java.rmi.RemoteException

killAll

void killAll()
       throws java.rmi.RemoteException

shutdown

boolean shutdown(boolean waitForUsers)
           throws java.rmi.RemoteException

dumpDB

void dumpDB()
      throws java.rmi.RemoteException

runInvidTest

void runInvidTest()
            throws java.rmi.RemoteException

runInvidSweep

void runInvidSweep()
             throws java.rmi.RemoteException

runEmbeddedTest

void runEmbeddedTest()
               throws java.rmi.RemoteException

runEmbeddedSweep

void runEmbeddedSweep()
                throws java.rmi.RemoteException

pullSchema

void pullSchema()
          throws java.rmi.RemoteException

handleReturnVal

public ReturnVal handleReturnVal(ReturnVal retVal)

This method takes a ReturnVal object from the server and, if necessary, runs through a wizard interaction sequence, possibly displaying several dialogs before finally returning a final result code.

Use the ReturnVal returned from this function after this function is called to determine the ultimate success or failure of any operation which returns ReturnVal, because a wizard sequence may determine the ultimate result.

This method should not be synchronized, since handleReturnVal may pop up modal (thread-blocking) dialogs, and if we we synchronize this, some Swing or AWT code seems to block on our synchronization when we do pop-up dialogs. It's not any of my code, so I assume that AWT tries to synchronize on the frame when parenting a new dialog.