com.couchbase.client.protocol.views
Class HttpOperationImpl

java.lang.Object
  extended by com.couchbase.client.protocol.views.HttpOperationImpl
All Implemented Interfaces:
HttpOperation
Direct Known Subclasses:
DesignDocFetcherOperationImpl, DesignDocOperationImpl, SpatialViewFetcherOperationImpl, ViewFetcherOperationImpl, ViewOperationImpl

public abstract class HttpOperationImpl
extends java.lang.Object
implements HttpOperation

An HttpOperationImpl.


Field Summary
protected  net.spy.memcached.ops.OperationCallback callback
           
protected  net.spy.memcached.ops.OperationException exception
           
 
Constructor Summary
HttpOperationImpl(org.apache.http.HttpRequest r, net.spy.memcached.ops.OperationCallback cb)
           
 
Method Summary
 void addAuthHeader(java.lang.String authzn)
           
 void cancel()
           
 net.spy.memcached.ops.OperationCallback getCallback()
           
protected  java.lang.String getEntityString(org.apache.http.HttpResponse response)
           
 net.spy.memcached.ops.OperationException getException()
           
 org.apache.http.HttpRequest getRequest()
           
abstract  void handleResponse(org.apache.http.HttpResponse response)
           
 boolean hasErrored()
           
 boolean isCancelled()
           
 boolean isTimedOut()
           
protected  net.spy.memcached.ops.OperationStatus parseViewForStatus(java.lang.String json, int errorcode)
           
 void setException(net.spy.memcached.ops.OperationException e)
           
 void timeOut()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

callback

protected final net.spy.memcached.ops.OperationCallback callback

exception

protected net.spy.memcached.ops.OperationException exception
Constructor Detail

HttpOperationImpl

public HttpOperationImpl(org.apache.http.HttpRequest r,
                         net.spy.memcached.ops.OperationCallback cb)
Method Detail

getRequest

public org.apache.http.HttpRequest getRequest()
Specified by:
getRequest in interface HttpOperation

getCallback

public net.spy.memcached.ops.OperationCallback getCallback()
Specified by:
getCallback in interface HttpOperation

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface HttpOperation

hasErrored

public boolean hasErrored()
Specified by:
hasErrored in interface HttpOperation

isTimedOut

public boolean isTimedOut()
Specified by:
isTimedOut in interface HttpOperation

cancel

public void cancel()
Specified by:
cancel in interface HttpOperation

timeOut

public void timeOut()
Specified by:
timeOut in interface HttpOperation

getException

public net.spy.memcached.ops.OperationException getException()
Specified by:
getException in interface HttpOperation

setException

public void setException(net.spy.memcached.ops.OperationException e)

addAuthHeader

public void addAuthHeader(java.lang.String authzn)
Specified by:
addAuthHeader in interface HttpOperation

handleResponse

public abstract void handleResponse(org.apache.http.HttpResponse response)
Specified by:
handleResponse in interface HttpOperation

getEntityString

protected java.lang.String getEntityString(org.apache.http.HttpResponse response)

parseViewForStatus

protected net.spy.memcached.ops.OperationStatus parseViewForStatus(java.lang.String json,
                                                                   int errorcode)
                                                            throws java.text.ParseException
Throws:
java.text.ParseException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.