IAIK TSP
version 2.32

iaik.tsp.transport.http
Class TspHttpResponse

java.lang.Object
  extended by iaik.tsp.transport.http.TspHttpResponse

public class TspHttpResponse
extends java.lang.Object

Wrapper class for the supported response formats of a HTTP request.


Constructor Summary
TspHttpResponse(int httpCode, java.lang.String errorMsg)
          Creates a TspHttpResponse representing an HTTP error.
TspHttpResponse(TimeStampResp response)
          Creates a TspHttpResponse containing a TimeStampResp.
 
Method Summary
 java.lang.String getErrorMsg()
          Returns the error message or null if this response is a finalMsgRep.
 int getHttpCode()
          Returns the received HTTP code.
 TimeStampResp getTimeStampResp()
          Returns the TimeStampResp or null if this response is an HTTP error.
 boolean isErrorResponse()
          Indicates whether this response is an HTTP error 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

TspHttpResponse

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

Parameters:
response - The TimeStampResp.

TspHttpResponse

public TspHttpResponse(int httpCode,
                       java.lang.String errorMsg)
Creates a TspHttpResponse representing an HTTP error.

Parameters:
httpCode - The received HTTP code.
errorMsg - The error message.
Method Detail

getTimeStampResp

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

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.

getHttpCode

public int getHttpCode()
Returns the received HTTP code.

Returns:
The HTTP Code.

isErrorResponse

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

Returns:
True if this response is an HTTP error 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