uk.org.ury.server
Class Server

java.lang.Object
  extended by uk.org.ury.server.Server

public class Server
extends java.lang.Object

The unified URY server, accepting requests over HTTP.

Version:
2011.0320
Author:
Matt Windsor

Field Summary
static java.lang.String DOCTYPE
           
static java.lang.String INDEX_HTML
           
static java.lang.String SERVER_VERSION
           
 
Constructor Summary
Server()
           
 
Method Summary
 DatabaseDriver getDatabaseConnection(UserClass userClass)
          Gets a database connection using the given user class.
 java.lang.String getVersion()
           
static void main(java.lang.String[] args)
          The main method, which serves to create a server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_VERSION

public static final java.lang.String SERVER_VERSION
See Also:
Constant Field Values

DOCTYPE

public static final java.lang.String DOCTYPE
See Also:
Constant Field Values

INDEX_HTML

public static final java.lang.String INDEX_HTML
See Also:
Constant Field Values
Constructor Detail

Server

public Server()
Method Detail

main

public static void main(java.lang.String[] args)
The main method, which serves to create a server.

Parameters:
args - The argument vector.

getDatabaseConnection

public DatabaseDriver getDatabaseConnection(UserClass userClass)
                                     throws MissingCredentialsException,
                                            ConnectionFailureException
Gets a database connection using the given user class.

Parameters:
userClass - The user class to get a connection for.
Returns:
a database connection, which may or may not have been created on this call.
Throws:
MissingCredentialsException - if the credentials for the given userclass are missing.
ConnectionFailureException - if the connection failed.

getVersion

public java.lang.String getVersion()
Returns:
the version string of the server.