org.basex.server
Class BaseXServerNew

java.lang.Object
  extended by org.basex.server.BaseXServerNew

public final class BaseXServerNew
extends java.lang.Object

This is the starter class for the database server. It handles incoming requests and offers some simple threading to allow simultaneous database requests. Add the '-h' option to get a list on all available command-line arguments.

Author:
Workgroup DBIS, University of Konstanz 2005-09, ISC License, Andreas Weiler, Christian Gruen

Field Summary
 Context context
          Database Context.
 
Constructor Summary
BaseXServerNew(java.lang.String... args)
          The server calls this constructor to listen on the given port for incoming connections.
 
Method Summary
 void close()
          Closes everything up.
static void error(java.lang.Exception ex, boolean quiet)
          Prints a server error message.
static void main(java.lang.String[] args)
          Main method, launching the server process.
 void quit()
          Quits the server.
 void stop()
          Stops the server socket listener.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

public final Context context
Database Context.

Constructor Detail

BaseXServerNew

public BaseXServerNew(java.lang.String... args)
The server calls this constructor to listen on the given port for incoming connections. Protocol version handshake is performed when the connection is established. This constructor blocks until a client connects.

Parameters:
args - arguments
Method Detail

main

public static void main(java.lang.String[] args)
Main method, launching the server process. Command-line arguments can be listed with the -h argument.

Parameters:
args - command-line arguments

stop

public void stop()
          throws java.io.IOException
Stops the server socket listener.

Throws:
java.io.IOException - I/O exception

quit

public void quit()
Quits the server.


close

public void close()
Closes everything up.


error

public static void error(java.lang.Exception ex,
                         boolean quiet)
Prints a server error message.

Parameters:
ex - exception reference
quiet - quiet flag