org.jfrog.build.client.bintrayResponse
Class BintrayResponseFactory

java.lang.Object
  extended by org.jfrog.build.client.bintrayResponse.BintrayResponseFactory

public class BintrayResponseFactory
extends java.lang.Object

Class that handles BintrayResponse creation according to the status retrieved from http response.


Constructor Summary
BintrayResponseFactory()
           
 
Method Summary
static BintrayResponse createResponse(int status, org.codehaus.jackson.JsonParser parser)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BintrayResponseFactory

public BintrayResponseFactory()
Method Detail

createResponse

public static BintrayResponse createResponse(int status,
                                             org.codehaus.jackson.JsonParser parser)
Parameters:
status - code from HttpResponse upon which we are deciding the outcome of the request
parser - JsonParser that is initialized with the HttpResponse body content as an InputStream
Returns:
BintrayResponse object which can be printed in a readable way on the screen if any Json call will due to IOException and we will not be able to retrieve the information we will create an Response with only the status code.