public final class BaseXServer extends Main implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
boolean |
running
Flag for server activity.
|
| Constructor and Description |
|---|
BaseXServer(Context ctx,
java.lang.String... args)
Constructor.
|
BaseXServer(java.lang.String... args)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
block(byte[] client)
Registers the client and calculates the delay after unsuccessful logins.
|
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 |
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.
|
void |
unblock(byte[] client)
Resets the login delay after successful login.
|
public BaseXServer(java.lang.String... args)
throws java.io.IOException
args - command-line argumentsjava.io.IOException - I/O exceptionpublic BaseXServer(Context ctx, java.lang.String... args) throws java.io.IOException
ctx - database contextargs - command-line argumentsjava.io.IOException - I/O exceptionpublic static void main(java.lang.String[] args)
-h argument.args - command-line argumentspublic void run()
run in interface java.lang.Runnableprotected void quit()
throws java.io.IOException
Mainprotected void parseArguments(java.lang.String[] args)
throws java.io.IOException
MainparseArguments in class Mainargs - command-line argumentsjava.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 argumentsBaseXException - database exceptionpublic static boolean ping(java.lang.String host,
int port)
host - hostport - server portpublic static void stop(int port,
int eport)
throws java.io.IOException
port - server porteport - event portjava.io.IOException - I/O exceptionpublic int block(byte[] client)
client - client addresspublic void unblock(byte[] client)
client - client addresspublic void initEvents()