public final class ClientListener
extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
long |
last
Timestamp of last interaction.
|
| Constructor and Description |
|---|
ClientListener(java.net.Socket s,
Context c,
Log l,
BaseXServer srv)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
register(java.net.Socket s)
Registers the event socket.
|
void |
run() |
java.lang.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, yieldpublic ClientListener(java.net.Socket s,
Context c,
Log l,
BaseXServer srv)
s - socketc - database contextl - log referencesrv - server referencepublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void quit()
public Context context()
public void register(java.net.Socket s)
throws java.io.IOException
s - socketjava.io.IOException - I/O exceptionpublic void notify(byte[] name,
byte[] msg)
throws java.io.IOException
name - event namemsg - event messagejava.io.IOException - I/O exceptionpublic java.lang.String toString()
toString in class java.lang.Thread