org.fishwife.jrugged.httpclient
Class DefaultResponseFailureAssessor

java.lang.Object
  extended by org.fishwife.jrugged.httpclient.DefaultResponseFailureAssessor
All Implemented Interfaces:
ResponseFailureAssessor

public class DefaultResponseFailureAssessor
extends Object
implements ResponseFailureAssessor

A ResponseFailureAssessor that treats all 4XX and 5XX status codes as failures.


Constructor Summary
DefaultResponseFailureAssessor()
           
 
Method Summary
 boolean isFailure(org.apache.http.HttpResponse resp)
          Returns true if the given response should be treated as a failure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResponseFailureAssessor

public DefaultResponseFailureAssessor()
Method Detail

isFailure

public boolean isFailure(org.apache.http.HttpResponse resp)
Description copied from interface: ResponseFailureAssessor
Returns true if the given response should be treated as a failure. N.B.: implementors should not consume the response body unless they check that the underlying HttpEntity is repeatable first.

Specified by:
isFailure in interface ResponseFailureAssessor


Copyright © 2013. All Rights Reserved.