IAIK TSP
version 2.32

iaik.tsp.transport.tcpip
Class TspTcpIpResponse

java.lang.Object
  extended by iaik.tsp.transport.tcpip.TspTcpIpResponse

public class TspTcpIpResponse
extends java.lang.Object

Wrapper class for the supported response formats finalMsgRep and errorMsgRep.


Constructor Summary
TspTcpIpResponse(java.lang.String errorMsg)
          Creates a TspTcpIpResponse representing an errorMsgRep.
TspTcpIpResponse(TimeStampResp response)
          Creates a TspTcpIpResponse containing a TimeStampResp.
 
Method Summary
 java.lang.String getErrorMsg()
          Returns the error message or null if this response is a finalMsgRep.
 TimeStampResp getTimeStampResp()
          Returns the TimeStampResp or null if this response is an errorMsgRep.
 boolean isErrorResponse()
          Indicates whether this is response is an errorMsgRep or not.
 java.lang.String toString()
          Returns a string representation of this response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TspTcpIpResponse

public TspTcpIpResponse(TimeStampResp response)
Creates a TspTcpIpResponse containing a TimeStampResp.

Parameters:
response - The TimeStampResp.

TspTcpIpResponse

public TspTcpIpResponse(java.lang.String errorMsg)
Creates a TspTcpIpResponse representing an errorMsgRep.

Parameters:
errorMsg - The error message.
Method Detail

getTimeStampResp

public TimeStampResp getTimeStampResp()
Returns the TimeStampResp or null if this response is an errorMsgRep.

Returns:
The TimeStampResp or null.

getErrorMsg

public java.lang.String getErrorMsg()
Returns the error message or null if this response is a finalMsgRep.

Returns:
The error message or null.

isErrorResponse

public boolean isErrorResponse()
Indicates whether this is response is an errorMsgRep or not.

Returns:
True if this response is an errorMsgRep otherwise false.

toString

public java.lang.String toString()
Returns a string representation of this response.

Overrides:
toString in class java.lang.Object
See Also:
TimeStampResp.toString()

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