org.javaswift.joss.command.impl.core
Class AbstractCommand<M extends org.apache.http.client.methods.HttpRequestBase,N>

java.lang.Object
  extended by org.javaswift.joss.command.impl.core.AbstractCommand<M,N>
All Implemented Interfaces:
Closeable, Callable<N>
Direct Known Subclasses:
AbstractSecureCommand, BasicAuthenticationCommandImpl, KeystoneAuthenticationCommandImpl

public abstract class AbstractCommand<M extends org.apache.http.client.methods.HttpRequestBase,N>
extends Object
implements Callable<N>, Closeable


Field Summary
static org.slf4j.Logger LOG
           
protected  M request
           
protected  org.apache.http.HttpResponse response
           
 
Constructor Summary
AbstractCommand(org.apache.http.client.HttpClient httpClient, String url)
           
 
Method Summary
protected  void addHeaders(Collection<? extends Header> headers)
           
 N call()
           
 void close()
           
protected  boolean closeStreamAutomatically()
           
protected  org.codehaus.jackson.map.ObjectMapper createObjectMapper(boolean dealWithRootValue)
           
protected abstract  M createRequest(String url)
           
protected  N getReturnObject(org.apache.http.HttpResponse response)
           
protected abstract  HttpStatusChecker[] getStatusCheckers()
           
protected  void modifyURI(QueryParameters queryParameters)
           
 void setAllowErrorLog(boolean allowErrorLog)
           
protected  void setHeader(Header header)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.slf4j.Logger LOG

request

protected M extends org.apache.http.client.methods.HttpRequestBase request

response

protected org.apache.http.HttpResponse response
Constructor Detail

AbstractCommand

public AbstractCommand(org.apache.http.client.HttpClient httpClient,
                       String url)
Method Detail

setAllowErrorLog

public void setAllowErrorLog(boolean allowErrorLog)

call

public N call()
Specified by:
call in interface Callable<N>

setHeader

protected void setHeader(Header header)

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

closeStreamAutomatically

protected boolean closeStreamAutomatically()

addHeaders

protected void addHeaders(Collection<? extends Header> headers)

createRequest

protected abstract M createRequest(String url)

getStatusCheckers

protected abstract HttpStatusChecker[] getStatusCheckers()

getReturnObject

protected N getReturnObject(org.apache.http.HttpResponse response)
                     throws IOException
Throws:
IOException

modifyURI

protected void modifyURI(QueryParameters queryParameters)

createObjectMapper

protected org.codehaus.jackson.map.ObjectMapper createObjectMapper(boolean dealWithRootValue)


Copyright © 2012-2014 42 BV. All Rights Reserved.