org.ektorp.http
Class StdResponseHandler<T>

java.lang.Object
  extended by org.ektorp.http.StdResponseHandler<T>
Type Parameters:
T -
All Implemented Interfaces:
ResponseCallback<T>
Direct Known Subclasses:
BulkOperationResponseHandler, DocIdResponseHandler, EmbeddedDocViewResponseHandler, PageResponseHandler, RevisionResponseHandler

public class StdResponseHandler<T>
extends Object
implements ResponseCallback<T>

Author:
henrik lundgren

Constructor Summary
StdResponseHandler()
           
 
Method Summary
static DbAccessException createDbAccessException(HttpResponse hr)
          Creates an DbAccessException which specific type is determined by the response code in the http response.
 T error(HttpResponse hr)
           
 T success(HttpResponse hr)
          Called when http response code is < 300
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StdResponseHandler

public StdResponseHandler()
Method Detail

createDbAccessException

public static DbAccessException createDbAccessException(HttpResponse hr)
Creates an DbAccessException which specific type is determined by the response code in the http response.

Parameters:
hr -
Returns:

error

public T error(HttpResponse hr)
Specified by:
error in interface ResponseCallback<T>

success

public T success(HttpResponse hr)
          throws Exception
Description copied from interface: ResponseCallback
Called when http response code is < 300

Specified by:
success in interface ResponseCallback<T>
Throws:
Exception


Copyright © 2011. All Rights Reserved.