org.javaswift.joss.command.impl.object
Class AbstractDownloadObjectCommand<M extends org.apache.http.client.methods.HttpGet,N>

java.lang.Object
  extended by org.javaswift.joss.command.impl.core.AbstractCommand<M,N>
      extended by org.javaswift.joss.command.impl.core.AbstractSecureCommand<M,N>
          extended by org.javaswift.joss.command.impl.object.AbstractObjectCommand<org.apache.http.client.methods.HttpGet,N>
              extended by org.javaswift.joss.command.impl.object.AbstractDownloadObjectCommand<M,N>
All Implemented Interfaces:
Closeable, Callable<N>
Direct Known Subclasses:
DownloadObjectAsByteArrayCommandImpl, DownloadObjectAsInputStreamCommandImpl, DownloadObjectToFileCommandImpl

public abstract class AbstractDownloadObjectCommand<M extends org.apache.http.client.methods.HttpGet,N>
extends AbstractObjectCommand<org.apache.http.client.methods.HttpGet,N>


Field Summary
static String CONTENT_LENGTH
           
static String ETAG
           
 
Fields inherited from class org.javaswift.joss.command.impl.core.AbstractCommand
LOG, request, response
 
Constructor Summary
AbstractDownloadObjectCommand(Account account, org.apache.http.client.HttpClient httpClient, Access access, StoredObject object, DownloadInstructions downloadInstructions)
           
 
Method Summary
protected  org.apache.http.client.methods.HttpGet createRequest(String url)
           
protected abstract  String getMd5()
           
protected abstract  N getObjectAsReturnObject()
           
protected  N getReturnObject(org.apache.http.HttpResponse response)
           
 HttpStatusChecker[] getStatusCheckers()
           
protected abstract  void handleEntity(org.apache.http.HttpEntity entity)
           
 
Methods inherited from class org.javaswift.joss.command.impl.core.AbstractSecureCommand
call, getURL, setConnectionKeepAlive
 
Methods inherited from class org.javaswift.joss.command.impl.core.AbstractCommand
addHeaders, close, closeStreamAutomatically, createObjectMapper, modifyURI, setAllowErrorLog, setHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ETAG

public static final String ETAG
See Also:
Constant Field Values

CONTENT_LENGTH

public static final String CONTENT_LENGTH
See Also:
Constant Field Values
Constructor Detail

AbstractDownloadObjectCommand

public AbstractDownloadObjectCommand(Account account,
                                     org.apache.http.client.HttpClient httpClient,
                                     Access access,
                                     StoredObject object,
                                     DownloadInstructions downloadInstructions)
Method Detail

getReturnObject

protected N getReturnObject(org.apache.http.HttpResponse response)
                     throws IOException
Overrides:
getReturnObject in class AbstractCommand<org.apache.http.client.methods.HttpGet,N>
Throws:
IOException

handleEntity

protected abstract void handleEntity(org.apache.http.HttpEntity entity)
                              throws IOException
Throws:
IOException

getMd5

protected abstract String getMd5()
                          throws IOException
Throws:
IOException

getObjectAsReturnObject

protected abstract N getObjectAsReturnObject()

createRequest

protected org.apache.http.client.methods.HttpGet createRequest(String url)
Specified by:
createRequest in class AbstractCommand<org.apache.http.client.methods.HttpGet,N>

getStatusCheckers

public HttpStatusChecker[] getStatusCheckers()
Specified by:
getStatusCheckers in class AbstractCommand<org.apache.http.client.methods.HttpGet,N>


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