Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hsqldb
Class Server  view Server download Server.java

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.hsqldb.Server
All Implemented Interfaces:
java.lang.Runnable

public class Server
extends java.lang.Thread

Server acts as a database server and is one way of using the client-server mode of HSQL Database Engine. This server can only process database queries.

An applet or application will use only the JDBC classes to access the database.

The Server can be configured with the file 'server.properties'. This is an example of the file:

 server.port=9001

server.database=test

server.silent=true

If the server is embedded in an application server, such as when DataSource or HsqlServerFactory classes are used, it is necessary to avoid calling System.exit() when the HSQLDB is shutdown with an SQL command.
For this, the server.no_system_exit property can be set either on the command line or in server.properties file. This ensures that System.exit() is not called at the end. All that is left for the embedder application server is to release the "empty" Server object and create another one to reopen the database (fredt@users).

Version:
1.7.0

Nested Class Summary
 
Nested classes inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
(package private) static int CONNECTION_CLOSED
          Description of the Field
(package private)  Database mDatabase
          Description of the Field
private  boolean noSystemExit
          Description of the Field
private  boolean restartOnShutdown
          Description of the Field
(package private)  java.util.Vector serverConnList
          Description of the Field
(package private)  HsqlProperties serverProperties
          Description of the Field
protected  java.net.ServerSocket socket
          Description of the Field
protected  java.lang.Thread thread
          Description of the Field
protected  boolean traceMessages
          Description of the Field
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Server()
           
 
Method Summary
(package private)  void closeAllServerConnections()
          Description of the Method
static void main(java.lang.String[] arg)
          Method declaration
(package private)  void notify(int action)
          Description of the Method
(package private)  void openDB()
          Description of the Method
(package private) static void printHelp()
          Description of the Method
(package private)  void printTraceMessages()
          Description of the Method
 void run()
          Method declaration
 void setProperties(HsqlProperties props)
          Sets the properties attribute of the Server object
(package private)  void trace(java.lang.String s)
          Method declaration
(package private)  void traceError(java.lang.String s)
          Method declaration
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONNECTION_CLOSED

static final int CONNECTION_CLOSED
Description of the Field

See Also:
Constant Field Values

serverConnList

java.util.Vector serverConnList
Description of the Field


mDatabase

Database mDatabase
Description of the Field


serverProperties

HsqlProperties serverProperties
Description of the Field


socket

protected java.net.ServerSocket socket
Description of the Field


thread

protected java.lang.Thread thread
Description of the Field


traceMessages

protected boolean traceMessages
Description of the Field


restartOnShutdown

private boolean restartOnShutdown
Description of the Field


noSystemExit

private boolean noSystemExit
Description of the Field

Constructor Detail

Server

public Server()
Method Detail

main

public static void main(java.lang.String[] arg)
Method declaration


setProperties

public void setProperties(HsqlProperties props)
Sets the properties attribute of the Server object


openDB

void openDB()
      throws java.sql.SQLException
Description of the Method


run

public void run()
Method declaration


printHelp

static void printHelp()
Description of the Method


printTraceMessages

void printTraceMessages()
Description of the Method


trace

void trace(java.lang.String s)
Method declaration


traceError

void traceError(java.lang.String s)
Method declaration


closeAllServerConnections

void closeAllServerConnections()
Description of the Method


notify

void notify(int action)
Description of the Method