|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.opengts.util.ServerSocketThread.ServerSessionThread
public class ServerSocketThread.ServerSessionThread
ServerSessionThread
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
ServerSocketThread.ServerSessionThread()
Empty Constructor |
|
ServerSocketThread.ServerSessionThread(org.opengts.util.ServerSocketThread.ClientSocket clientSock,
boolean startThread)
ClientSocket handler constructor |
|
| Method Summary | |
|---|---|
void |
close()
Close the current session |
void |
forceCloseTCPSession()
Interrupt/close client session |
int |
getAvailableBytes()
|
java.net.InetAddress |
getInetAddress()
|
int |
getLocalPort()
|
long |
getReadByteCount()
|
int |
getRemotePort()
|
long |
getSessionReceiveTime()
|
long |
getSessionStartTime()
|
long |
getSessionStartTimeMS()
|
java.lang.Thread |
getSessionThread()
(SessionInfo interface) returns the current thread |
long |
getWriteByteCount()
|
void |
handleClientSession(org.opengts.util.ServerSocketThread.ClientSocket clientSock)
|
boolean |
isAvailable()
|
boolean |
isInputStream()
Returns true if the current session transport is a generic InputStream |
boolean |
isShutdown()
|
boolean |
isTCP()
Returns true if the current session transport is TCP |
boolean |
isUDP()
Returns true if the current session transport is UDP |
void |
run()
|
boolean |
setClientIfAvailable(org.opengts.util.ServerSocketThread.ClientSocket clientSocket)
|
void |
signalShutdown()
Signal thread to shut down |
void |
start()
Start Client session thread |
boolean |
tcpWrite(byte[] data)
|
boolean |
udpWrite(byte[] data)
|
| Methods inherited from class java.lang.Thread |
|---|
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, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ServerSocketThread.ServerSessionThread()
public ServerSocketThread.ServerSessionThread(org.opengts.util.ServerSocketThread.ClientSocket clientSock,
boolean startThread)
clientSock - The ClientSocket instancestartThread - True to start this thread| Method Detail |
|---|
public void start()
start in class java.lang.Threadjava.lang.OutOfMemoryError - If unable to create new native thread.
java.lang.IllegalThreadStateException - If thread has already been started.public java.lang.Thread getSessionThread()
getSessionThread in interface ServerSocketThread.SessionInfopublic boolean setClientIfAvailable(org.opengts.util.ServerSocketThread.ClientSocket clientSocket)
public boolean isAvailable()
public int getLocalPort()
getLocalPort in interface ServerSocketThread.SessionInfopublic int getRemotePort()
getRemotePort in interface ServerSocketThread.SessionInfopublic boolean isTCP()
isTCP in interface ServerSocketThread.SessionInfopublic boolean isUDP()
isUDP in interface ServerSocketThread.SessionInfopublic boolean isInputStream()
isInputStream in interface ServerSocketThread.SessionInfopublic java.net.InetAddress getInetAddress()
getInetAddress in interface ServerSocketThread.SessionInfopublic int getAvailableBytes()
getAvailableBytes in interface ServerSocketThread.SessionInfopublic long getReadByteCount()
getReadByteCount in interface ServerSocketThread.SessionInfopublic long getWriteByteCount()
getWriteByteCount in interface ServerSocketThread.SessionInfopublic long getSessionStartTimeMS()
getSessionStartTimeMS in interface ServerSocketThread.SessionInfopublic long getSessionStartTime()
getSessionStartTime in interface ServerSocketThread.SessionInfopublic long getSessionReceiveTime()
getSessionReceiveTime in interface ServerSocketThread.SessionInfopublic boolean tcpWrite(byte[] data)
tcpWrite in interface ServerSocketThread.SessionInfopublic boolean udpWrite(byte[] data)
udpWrite in interface ServerSocketThread.SessionInfopublic void forceCloseTCPSession()
forceCloseTCPSession in interface ServerSocketThread.SessionInfo
public void close()
throws java.io.IOException
java.io.IOExceptionpublic void signalShutdown()
public boolean isShutdown()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void handleClientSession(org.opengts.util.ServerSocketThread.ClientSocket clientSock)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||