Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
Timer |
auth
Timer for authentication time out.
|
long |
last
Timestamp of last interaction.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
ClientListener(Socket socket,
Context context,
BaseXServer server)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
address()
Returns the host and port of a client.
|
Context |
context()
Returns the context of this session.
|
void |
notify(byte[] name,
byte[] msg)
Sends a notification to the client.
|
void |
quit()
Exits the session.
|
void |
quitAuth()
Quits the authentication.
|
void |
register(Socket s)
Registers the event socket.
|
void |
run() |
String |
toString() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
public final Timer auth
public long last
public ClientListener(Socket socket, Context context, BaseXServer server)
socket
- socketcontext
- database contextserver
- server referencepublic void quitAuth()
public void quit()
public Context context()
public void register(Socket s) throws IOException
s
- socketIOException
- I/O exceptionpublic void notify(byte[] name, byte[] msg) throws IOException
name
- event namemsg
- event messageIOException
- I/O exceptionpublic String address()
Copyright © 2005–2015 BaseX Team. All rights reserved.