|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.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 threadMethod Detail |
---|
public void start()
start
in class java.lang.Thread
java.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.SessionInfo
public boolean setClientIfAvailable(org.opengts.util.ServerSocketThread.ClientSocket clientSocket)
public boolean isAvailable()
public int getLocalPort()
getLocalPort
in interface ServerSocketThread.SessionInfo
public int getRemotePort()
getRemotePort
in interface ServerSocketThread.SessionInfo
public boolean isTCP()
isTCP
in interface ServerSocketThread.SessionInfo
public boolean isUDP()
isUDP
in interface ServerSocketThread.SessionInfo
public boolean isInputStream()
isInputStream
in interface ServerSocketThread.SessionInfo
public java.net.InetAddress getInetAddress()
getInetAddress
in interface ServerSocketThread.SessionInfo
public int getAvailableBytes()
getAvailableBytes
in interface ServerSocketThread.SessionInfo
public long getReadByteCount()
getReadByteCount
in interface ServerSocketThread.SessionInfo
public long getWriteByteCount()
getWriteByteCount
in interface ServerSocketThread.SessionInfo
public long getSessionStartTimeMS()
getSessionStartTimeMS
in interface ServerSocketThread.SessionInfo
public long getSessionStartTime()
getSessionStartTime
in interface ServerSocketThread.SessionInfo
public long getSessionReceiveTime()
getSessionReceiveTime
in interface ServerSocketThread.SessionInfo
public boolean tcpWrite(byte[] data)
tcpWrite
in interface ServerSocketThread.SessionInfo
public boolean udpWrite(byte[] data)
udpWrite
in interface ServerSocketThread.SessionInfo
public void forceCloseTCPSession()
forceCloseTCPSession
in interface ServerSocketThread.SessionInfo
public void close() throws java.io.IOException
java.io.IOException
public void signalShutdown()
public boolean isShutdown()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void handleClientSession(org.opengts.util.ServerSocketThread.ClientSocket clientSock)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |