edu.sdsc.inca
Class Depot

java.lang.Object
  extended by edu.sdsc.inca.Component
      extended by edu.sdsc.inca.Server
          extended by edu.sdsc.inca.Depot

public class Depot
extends edu.sdsc.inca.Server

The main depot object.

This object is responsible for retrieving configuration information, starting and cleaning up after the server as well as shutdown.

Configuration is handled by default using inca.properties in the classpath.


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.sdsc.inca.Server
edu.sdsc.inca.Server.ClientDispatcher, edu.sdsc.inca.Server.ServerShutdownHook
 
Field Summary
protected static java.lang.String DEPOT_OPTS
           
protected  boolean initDb
           
protected static org.jboss.logging.Logger logger
           
protected  boolean rmDb
           
 
Fields inherited from class edu.sdsc.inca.Server
ACCEPT_TIMEOUT, cd, CLIENT_TIMEOUT, SERVER_OPTS, ssocket, tempPath, workerCount, workers, workQueue
 
Fields inherited from class edu.sdsc.inca.Component
authenticate, cert, certPath, COMPONENT_OPTS, hostname, key, keyPath, logFile, password, port, trusted, trustedPath
 
Constructor Summary
Depot()
          Default Constructor.
 
Method Summary
 void initializeDatabase()
          Initialize the Inca database.
static void main(java.lang.String[] args)
          Start the depot from the command line.
 void removeDatabase()
          Delete the Inca database.
 void setConfiguration(java.util.Properties config)
          A convenience function for setting multiple configuration properties at once.
 
Methods inherited from class edu.sdsc.inca.Server
getTempPath, getWorkerCount, isRunning, runServer, setTempPath, setWorkerCount, shutdown
 
Methods inherited from class edu.sdsc.inca.Component
addTrustedCert, configComponent, createSocket, getAuthenticate, getCertificate, getCertificatePath, getHostname, getKey, getKeyPath, getLogFile, getPassword, getPort, getTrustedCertificates, getTrustedPath, getUri, openResourceStream, readCredentials, readVersion, setAuthenticate, setCertificatePath, setHostname, setKeyPath, setLogFile, setPassword, setPort, setTrustedPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.jboss.logging.Logger logger

DEPOT_OPTS

protected static final java.lang.String DEPOT_OPTS

initDb

protected boolean initDb

rmDb

protected boolean rmDb
Constructor Detail

Depot

public Depot()
Default Constructor.

Method Detail

initializeDatabase

public void initializeDatabase()
                        throws org.hibernate.HibernateException
Initialize the Inca database.

Throws:
org.hibernate.HibernateException - on database error

removeDatabase

public void removeDatabase()
                    throws org.hibernate.HibernateException
Delete the Inca database.

Throws:
org.hibernate.HibernateException - on database error

setConfiguration

public void setConfiguration(java.util.Properties config)
                      throws edu.sdsc.inca.ConfigurationException
A convenience function for setting multiple configuration properties at once. In addition to the keys recognized by the superclass, recognizes: "dbinit", a command to initialize the database; "remove", a command to delete the DB.

Overrides:
setConfiguration in class edu.sdsc.inca.Server
Parameters:
config - contains client configuration values
Throws:
ConfigurationException - on a faulty configuration property value

main

public static void main(java.lang.String[] args)
Start the depot from the command line.

Parameters:
args -