Package org.basex.server
Class ClientListener
java.lang.Object
java.lang.Thread
org.basex.server.ClientListener
- All Implemented Interfaces:
Runnable,ClientInfo
Server-side client session in the client-server architecture.
- Author:
- BaseX Team 2005-21, BSD License, Andreas Weiler, Christian Gruen
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionlongTimestamp of last interaction.final TimerTimer for authentication time out.Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionClientListener(Socket socket, Context context, BaseXServer server) Constructor. -
Method Summary
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, yieldMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.basex.server.ClientInfo
clientName
-
Field Details
-
timeout
Timer for authentication time out. -
last
public long lastTimestamp of last interaction.
-
-
Constructor Details
-
ClientListener
Constructor.- Parameters:
socket- socketcontext- database contextserver- server reference
-
-
Method Details
-
run
public void run() -
close
public void close()Closes the session. -
context
Returns the context of this session.- Returns:
- user reference
-
clientName
Description copied from interface:ClientInfoReturns the name of the current client.- Specified by:
clientNamein interfaceClientInfo- Returns:
- name of client
-
clientAddress
Description copied from interface:ClientInfoReturns the host and port of a client.- Specified by:
clientAddressin interfaceClientInfo- Returns:
- address of client
-
toString
-