This class is a TcpIp Server Socket and listen on by dynamically getting free portIt Creates new TcpIp Server Socket.
This class is a TcpIp Server Socket and listen on by dynamically getting free portIt Creates new TcpIp Server Socket. It also accept client socket connection. For each and every accepted client socket connection, it takes InputStream, Creates new InputThread instance by passing this InputStream and starts that created Thread.This class consists following Inner classes..
TcpSocketInfo : This Inner class is used to store information about a socket opened with a client. It stores information such as...sessionId :: SessionId of client, socket :: Tcp/ip socket reference of client, timer :: counter indicates how much time elapsed in seconds since Tcp/ip server has sends last updates (real updates as well as empty updates) to client, sendUpdates :: boolean value indicates whether Tcp/ip server has send updates (real or empty)
TcpIpEmptyUpdates:It iterates the TcpSocketInfoList, and for each and every TcpSocketInfo instance, Send empty updates i.e <updates/>EOF to client. This thread wakes up for every 5 minute InputThread : Inner class (Thread) which is used to read from InputStream of client's socket. CheckTcpSocketTimer : It itereates through tcpSocketInfoList,at every minute. For each iterated TcpSocketInfo, it checks Timer and if timer founds > 60, it closes the session
It registers itself as a static member of CommonUtilities so that anyone can access it by calling CommonUtilities.tcpIpServer. Also it starts new TcpIPEmptyUpdates thread for sending empty updates. @see TcpIpEmptyUpdates and CheckTcpSocketTimer thread to check timeout time for each socket. @see CheckTcpSocketTimer
Alphabetic index HTML hierarchy of classes or Java