Constructor and Description |
---|
BaseXServer(Context ctx,
String... args)
Constructor.
|
BaseXServer(String... args)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
header()
Returns a header string for command-line information.
|
void |
initEvents()
Initializes the event listener.
|
static void |
main(String[] args)
Main method, launching the server process.
|
protected void |
parseArgs()
Parses the command-line arguments, specified by the user.
|
static boolean |
ping(String host,
int port)
Checks if a server is running.
|
void |
remove(ClientListener client)
Removes an authenticated session.
|
void |
run() |
static void |
start(int port,
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.
|
String |
usage()
Returns a usage string for command-line information.
|
public BaseXServer(String... args) throws IOException
args
- command-line argumentsIOException
- I/O exceptionpublic BaseXServer(Context ctx, String... args) throws IOException
ctx
- database contextargs
- command-line argumentsIOException
- I/O exceptionpublic static void main(String[] args)
-h
argument.args
- command-line argumentsprotected void parseArgs() throws IOException
Main
parseArgs
in class Main
IOException
- I/O exceptionpublic void stop() throws IOException
IOException
- I/O exceptionpublic static void start(int port, String... args) throws BaseXException
port
- server portargs
- command-line argumentsBaseXException
- database exceptionpublic static boolean ping(String host, int port)
host
- hostport
- server portpublic static void stop(int port, int eport) throws IOException
port
- server porteport
- event portIOException
- I/O exceptionpublic void remove(ClientListener client)
client
- client to be removedpublic void initEvents()
public String header()
Main
Copyright © 2005–2015 BaseX Team. All rights reserved.