Class DefaultResponse<O,I>

java.lang.Object
com.targomo.client.api.response.DefaultResponse<O,I>
Type Parameters:
O - this is the type of the data that ou want to be visible from outside the response
I - this is the type of data that Jackson should create and from which you parse the data of type O , e.g. usually Map from String to Object for an object
Direct Known Subclasses:
MultiGraphResponse, TimeVectorResponse

public abstract class DefaultResponse<O,I> extends Object
  • Field Details

    • data

      protected O data
  • Constructor Details

    • DefaultResponse

      public DefaultResponse()
  • Method Details

    • finishDeserialization

      public void finishDeserialization(TravelOptions travelOptions, long roundTripTimeMillis, long parseTimeMillis)
    • parseData

      protected abstract O parseData(I jacksonData)
    • getCode

      public ResponseCode getCode()
      Returns:
      the code
    • getRequestTimeMillis

      public long getRequestTimeMillis()
      Returns:
      the requestTimeMillis
    • getMessage

      public String getMessage()
    • getData

      public O getData()
    • getParseTimeMillis

      public long getParseTimeMillis()
    • getTravelOptions

      public TravelOptions getTravelOptions()
      Returns:
      the travelOptions
    • getRoundTripTimeMillis

      public long getRoundTripTimeMillis()
      Returns:
      the roundTripTimeMillis