Package com.aoindustries.aoserv.master
Class SocketServerThread
java.lang.Object
java.lang.Thread
com.aoindustries.aoserv.master.SocketServerThread
- All Implemented Interfaces:
RequestSource,Runnable
The
AOServServerThread handles a connection once it is accepted.- Author:
- AO Industries, Inc.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionSocketServerThread(TcpServer server, Socket socket) Creates a new, runningAOServServerThread. -
Method Summary
Modifier and TypeMethodDescriptionvoidcachesInvalidated(IntList tableList) Invalidates the listed tables.intGets the id of the server that this connection is created from.Gets the protocol version number supported by the client.Logs a security message toSystem.err.booleanisClosed()booleanisSecure()Determines if the communication with the client is currently secure.voidrun()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, toString, yield
-
Constructor Details
-
SocketServerThread
Creates a new, runningAOServServerThread.- Throws:
IOExceptionSQLException
-
-
Method Details
-
cachesInvalidated
Invalidates the listed tables. Also, if this connector represents a daemon, this invalidate is registered with ServerHandler for invalidation synchronization.IDEA: Could reduce signals under high load by combining entries that are not synchronous. Could even combine synchronous ones as long as all sync entries were acknowledged in the proper order.
- Specified by:
cachesInvalidatedin interfaceRequestSource- Throws:
IOException
-
getDaemonServer
public int getDaemonServer()Description copied from interface:RequestSourceGets the id of the server that this connection is created from. This is only used by connections initiated by daemons.- Specified by:
getDaemonServerin interfaceRequestSource- Returns:
- the id of the server or
-1for none
-
getNextInvalidatedTables
- Specified by:
getNextInvalidatedTablesin interfaceRequestSource
-
getConnectorId
- Specified by:
getConnectorIdin interfaceRequestSource
-
getProtocolVersion
Description copied from interface:RequestSourceGets the protocol version number supported by the client.- Specified by:
getProtocolVersionin interfaceRequestSource
-
getSecurityMessageHeader
Logs a security message toSystem.err. Also sends email messages toaoserv.server.- Specified by:
getSecurityMessageHeaderin interfaceRequestSource
-
getCurrentAdministrator
- Specified by:
getCurrentAdministratorin interfaceRequestSource
-
isSecure
Description copied from interface:RequestSourceDetermines if the communication with the client is currently secure.- Specified by:
isSecurein interfaceRequestSource- Throws:
UnknownHostException
-
run
public void run() -
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceRequestSource
-
