IAIK TSP
version 2.32

demo.tsp.connections.tcpip
Class TspTcpIpServer

java.lang.Object
  extended by demo.tsp.connections.tcpip.TspTcpIpServer

public class TspTcpIpServer
extends java.lang.Object

This class implements a TSP TCP/IP server. In this demo version only the finalMsg structure and errorMsg structure is provided without any polling.
For more details please refer to RFC 3161.


Field Summary
protected static org.apache.commons.logging.Log log
          The logger for this class.
 
Constructor Summary
TspTcpIpServer(java.lang.String propertyFile)
          Creates a new TspTcpIpServer.
 
Method Summary
 TspServerConfiguration getConfiguration()
          Returns the used TspServerConfiguration.
 boolean isRunning()
          Checks if the server is running.
static void main(java.lang.String[] args)
          Main class for a TspTcpIpServer.
 void receiveAndSendData()
          Waits for a connection from a client.
 void startServer()
          Starts the TSP TCP/IP server on the specified port.
 void stopServer()
          Stops the TSP TCP/IP server.
 
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

TspTcpIpServer

public TspTcpIpServer(java.lang.String propertyFile)
               throws java.io.IOException,
                      TspServerConfigurationException
Creates a new TspTcpIpServer.

Parameters:
propertyFile - The URL of the property file. If this parameter is null the default location (ServerConfiguration.properties) will be used.
Throws:
java.io.IOException - Thrown if the specified property is not in the classpath.
TspServerConfigurationException - Thrown if the PKCS#12 file could not be found or decrypted.
Method Detail

startServer

public void startServer()
Starts the TSP TCP/IP server on the specified port.


stopServer

public void stopServer()
Stops the TSP TCP/IP server.


isRunning

public boolean isRunning()
Checks if the server is running.

Returns:
true if the server is running, false otherwise

receiveAndSendData

public void receiveAndSendData()
                        throws java.io.IOException
Waits for a connection from a client. After the client has connected to the server a new TspTcpIpServerThread will be started.
This thread executes the communication with the client.

Throws:
java.io.IOException - Thrown if any connection problem occurs.

getConfiguration

public TspServerConfiguration getConfiguration()
Returns the used TspServerConfiguration.

Returns:
The configuration.

main

public static void main(java.lang.String[] args)
Main class for a TspTcpIpServer.

Parameters:
args - The first parameter is the property file to be used. If there are no arguments the default property file will be used.

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