|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.basex.server.ClientListener
public final class ClientListener
Server-side client session in the client-server architecture.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
java.util.Timer |
auth
Timer for authentication time out. |
long |
last
Timestamp of last interaction. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ClientListener(java.net.Socket s,
Context c,
BaseXServer srv)
Constructor. |
Method Summary | |
---|---|
java.lang.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(java.net.Socket s)
Registers the event socket. |
void |
run()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final java.util.Timer auth
public long last
Constructor Detail |
---|
public ClientListener(java.net.Socket s, Context c, BaseXServer srv)
s
- socketc
- database contextsrv
- server referenceMethod Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void quitAuth()
public void quit()
public Context context()
public void register(java.net.Socket s) throws java.io.IOException
s
- socket
java.io.IOException
- I/O exceptionpublic void notify(byte[] name, byte[] msg) throws java.io.IOException
name
- event namemsg
- event message
java.io.IOException
- I/O exceptionpublic java.lang.String address()
public java.lang.String toString()
toString
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |