IAIK TSP
version 2.32

demo.tsp.connections.tcpip
Class TspTcpIpServerThread

java.lang.Object
  extended by demo.tsp.connections.tcpip.TspTcpIpServerThread
All Implemented Interfaces:
java.lang.Runnable

public class TspTcpIpServerThread
extends java.lang.Object
implements java.lang.Runnable

This demo class implements a TSP TCP/IP server thread.
This thread reads a TimeStampReq and returns a TimeStampResp.


Field Summary
protected static org.apache.commons.logging.Log log
          The logger for this class.
 
Constructor Summary
TspTcpIpServerThread(java.net.Socket client_socket, int max_timer_out, TspTcpIpServer server)
          Creates a new TspTcpIpServerThread.
 
Method Summary
protected  java.math.BigInteger generateSerialNumber()
          Generates an unique serial number.
 void run()
          This method handles the communication with the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
The logger for this class.

Constructor Detail

TspTcpIpServerThread

public TspTcpIpServerThread(java.net.Socket client_socket,
                            int max_timer_out,
                            TspTcpIpServer server)
                     throws java.net.SocketException
Creates a new TspTcpIpServerThread.

Parameters:
client_socket - The socket of the client.
max_timer_out - The specified time out in milliseconds.
server - The server which uses this thread.
Throws:
java.net.SocketException - Thrown if an exception occurs during time out configuration. For details please refer to Socket.setSoTimeout(int).
Method Detail

run

public void run()
This method handles the communication with the client.

Specified by:
run in interface java.lang.Runnable

generateSerialNumber

protected java.math.BigInteger generateSerialNumber()
Generates an unique serial number.

Returns:
The unique serial number.

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK TSP, © 2002 IAIK, © 2003 - 2014 Stiftung SIC