org.jcoderz.commons.connector.http
Class ConnectorResponse

java.lang.Object
  extended by org.jcoderz.commons.connector.http.ConnectorResponse
All Implemented Interfaces:
Serializable

public class ConnectorResponse
extends Object
implements Serializable

Value object for the Connector Bean Test. Includes the time needed for sending the request and receiving the response and the amount of tries and the response message.

See Also:
Serialized Form

Constructor Summary
ConnectorResponse(long requestTime, int tries, byte[] response)
          Constructor of the value object.
 
Method Summary
 long getRequestTime()
          Get the request time in millis.
 byte[] getResponse()
          Get the response message.
 int getTries()
          Get the amount of tries.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectorResponse

public ConnectorResponse(long requestTime,
                         int tries,
                         byte[] response)
Constructor of the value object.

Parameters:
requestTime - - time in milli seconds need for sending the request and receiving the response
tries - - the amout of tries for performing the request
response - - the received response
Method Detail

getRequestTime

public long getRequestTime()
Get the request time in millis.

Returns:
long - the request time in millis, -1 if request failed

getTries

public int getTries()
Get the amount of tries.

Returns:
int - the amount of tries, 1 for no retry

getResponse

public byte[] getResponse()
Get the response message.

Returns:
byte[] - the response message

toString

public String toString()

Overrides:
toString in class Object


Copyright 2007 The jCoderZ Project.