Package com.dropbox.core.v2
Class DbxRawClientV2
- java.lang.Object
- 
- com.dropbox.core.v2.DbxRawClientV2
 
- 
 public abstract class DbxRawClientV2 extends java.lang.ObjectUse this class to make remote calls to the Dropbox API. You'll need an access token first, normally acquired viaDbxWebAuth.This class has no mutable state, so it's thread safe as long as you pass in a thread safe HttpRequestorimplementation.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringUSER_AGENT_ID
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedDbxRawClientV2(DbxRequestConfig requestConfig, DbxHost host, java.lang.String userId, PathRoot pathRoot)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddAuthHeaders(java.util.List<HttpRequestor.Header> headers)Add the appropriate authentication headers to the request, if any.protected abstract booleancanRefreshAccessToken()<ArgT,ResT,ErrT>
 DbxDownloader<ResT>downloadStyle(java.lang.String host, java.lang.String path, ArgT arg, boolean noAuth, java.util.List<HttpRequestor.Header> extraHeaders, StoneSerializer<ArgT> argSerializer, StoneSerializer<ResT> responseSerializer, StoneSerializer<ErrT> errorSerializer)DbxHostgetHost()Returns theDbxHostthat was passed in to the constructor.DbxRequestConfiggetRequestConfig()Returns theDbxRequestConfigthat was passed in to the constructor.java.lang.StringgetUserId()Returns theuserIdthat was passed in to the constructor.protected abstract booleanneedsRefreshAccessToken()abstract DbxRefreshResultrefreshAccessToken()<ArgT,ResT,ErrT>
 ResTrpcStyle(java.lang.String host, java.lang.String path, ArgT arg, boolean noAuth, StoneSerializer<ArgT> argSerializer, StoneSerializer<ResT> responseSerializer, StoneSerializer<ErrT> errorSerializer)<ArgT> HttpRequestor.UploaderuploadStyle(java.lang.String host, java.lang.String path, ArgT arg, boolean noAuth, StoneSerializer<ArgT> argSerializer)protected abstract DbxRawClientV2withPathRoot(PathRoot pathRoot)Clone a new DbxRawClientV2 with Dropbox-API-Path-Root header.
 
- 
- 
- 
Field Detail- 
USER_AGENT_IDpublic static final java.lang.String USER_AGENT_ID - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
DbxRawClientV2protected DbxRawClientV2(DbxRequestConfig requestConfig, DbxHost host, java.lang.String userId, PathRoot pathRoot) - Parameters:
- requestConfig- Configuration controlling How requests should be issued to Dropbox servers.
- host- Dropbox server hostnames (primarily for internal use)
- userId- The user ID of the current Dropbox account. Used for multi-Dropbox account use-case.
- pathRoot- We will send this value in Dropbox-API-Path-Root header if it presents.
 
 
- 
 - 
Method Detail- 
addAuthHeadersprotected abstract void addAuthHeaders(java.util.List<HttpRequestor.Header> headers) Add the appropriate authentication headers to the request, if any.- Parameters:
- headers- List of request headers. Add authentication headers to this list.
 
 - 
refreshAccessTokenpublic abstract DbxRefreshResult refreshAccessToken() throws DbxException - Throws:
- DbxException
 
 - 
canRefreshAccessTokenprotected abstract boolean canRefreshAccessToken() 
 - 
needsRefreshAccessTokenprotected abstract boolean needsRefreshAccessToken() 
 - 
withPathRootprotected abstract DbxRawClientV2 withPathRoot(PathRoot pathRoot) Clone a new DbxRawClientV2 with Dropbox-API-Path-Root header.- Parameters:
- pathRoot-- pathRootobject containing the content for Dropbox-API-Path-Root header.
 
 - 
rpcStylepublic <ArgT,ResT,ErrT> ResT rpcStyle(java.lang.String host, java.lang.String path, ArgT arg, boolean noAuth, StoneSerializer<ArgT> argSerializer, StoneSerializer<ResT> responseSerializer, StoneSerializer<ErrT> errorSerializer) throws DbxWrappedException, DbxException- Throws:
- DbxWrappedException
- DbxException
 
 - 
downloadStylepublic <ArgT,ResT,ErrT> DbxDownloader<ResT> downloadStyle(java.lang.String host, java.lang.String path, ArgT arg, boolean noAuth, java.util.List<HttpRequestor.Header> extraHeaders, StoneSerializer<ArgT> argSerializer, StoneSerializer<ResT> responseSerializer, StoneSerializer<ErrT> errorSerializer) throws DbxWrappedException, DbxException - Throws:
- DbxWrappedException
- DbxException
 
 - 
uploadStylepublic <ArgT> HttpRequestor.Uploader uploadStyle(java.lang.String host, java.lang.String path, ArgT arg, boolean noAuth, StoneSerializer<ArgT> argSerializer) throws DbxException - Throws:
- DbxException
 
 - 
getRequestConfigpublic DbxRequestConfig getRequestConfig() Returns theDbxRequestConfigthat was passed in to the constructor.- Returns:
- configuration to use for issuing requests.
 
 - 
getHostpublic DbxHost getHost() Returns theDbxHostthat was passed in to the constructor.- Returns:
- Dropbox hosts to use for requests.
 
 - 
getUserIdpublic java.lang.String getUserId() Returns theuserIdthat was passed in to the constructor.- Returns:
- The user ID of the current Dropbox account.
 
 
- 
 
-