|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.core.Main
org.basex.BaseXServer
public final class BaseXServer
This is the starter class for running the database server. It handles concurrent requests from multiple users.
Field Summary |
---|
Fields inherited from class org.basex.core.Main |
---|
console, context, newline, out, session, verbose |
Constructor Summary | |
---|---|
BaseXServer(Context ctx,
java.lang.String... args)
Constructor. |
|
BaseXServer(java.lang.String... args)
Constructor. |
Method Summary | |
---|---|
void |
initEvents()
Initializes the event listener. |
static void |
main(java.lang.String[] args)
Main method, launching the server process. |
protected void |
parseArguments(java.lang.String... args)
Parses the command-line arguments, specified by the user. |
static boolean |
ping(java.lang.String host,
int port)
Checks if a server is running. |
protected void |
quit()
Quits the console mode. |
void |
remove(ClientListener client)
Removes an authenticated session. |
void |
run()
|
protected Session |
session()
Returns the session. |
static void |
start(int port,
java.lang.String... args)
Starts the database server in a separate process. |
void |
stop()
Stops the server of this instance. |
static void |
stop(int port,
int eport)
Stops the server. |
Methods inherited from class org.basex.core.Main |
---|
console, execute, execute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseXServer(java.lang.String... args) throws java.io.IOException
args
- command-line arguments
java.io.IOException
- I/O exceptionpublic BaseXServer(Context ctx, java.lang.String... args) throws java.io.IOException
ctx
- database contextargs
- command-line arguments
java.io.IOException
- I/O exceptionMethod Detail |
---|
public static void main(java.lang.String[] args)
-h
argument.
args
- command-line argumentspublic void run()
run
in interface java.lang.Runnable
protected void quit() throws java.io.IOException
Main
quit
in class Main
java.io.IOException
- I/O exceptionprotected Session session()
Main
session
in class Main
protected void parseArguments(java.lang.String... args) throws java.io.IOException
Main
parseArguments
in class Main
args
- command-line arguments
java.io.IOException
- I/O exceptionpublic void stop() throws java.io.IOException
java.io.IOException
- I/O exceptionpublic static void start(int port, java.lang.String... args) throws BaseXException
port
- server portargs
- command-line arguments
BaseXException
- database exceptionpublic static boolean ping(java.lang.String host, int port)
host
- hostport
- server port
public static void stop(int port, int eport) throws java.io.IOException
port
- server porteport
- event port
java.io.IOException
- I/O exceptionpublic void remove(ClientListener client)
client
- client to be removedpublic void initEvents()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |