public abstract class DbxRawClientV2
extends java.lang.Object
DbxWebAuth
.
This class has no mutable state, so it's thread safe as long as you pass in a thread safe
HttpRequestor
implementation.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
USER_AGENT_ID |
Modifier | Constructor and Description |
---|---|
protected |
DbxRawClientV2(DbxRequestConfig requestConfig,
DbxHost host,
java.lang.String userId,
PathRoot pathRoot) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addAuthHeaders(java.util.List<HttpRequestor.Header> headers)
Add the appropriate authentication headers to the request, if any.
|
<ArgT,ResT,ErrT> |
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) |
DbxHost |
getHost()
Returns the
DbxHost that was passed in to the constructor. |
DbxRequestConfig |
getRequestConfig()
Returns the
DbxRequestConfig that was passed in to the constructor. |
java.lang.String |
getUserId()
Returns the
userId that was passed in to the constructor. |
abstract DbxRefreshResult |
refreshAccessToken() |
<ArgT,ResT,ErrT> |
rpcStyle(java.lang.String host,
java.lang.String path,
ArgT arg,
boolean noAuth,
StoneSerializer<ArgT> argSerializer,
StoneSerializer<ResT> responseSerializer,
StoneSerializer<ErrT> errorSerializer) |
<ArgT> HttpRequestor.Uploader |
uploadStyle(java.lang.String host,
java.lang.String path,
ArgT arg,
boolean noAuth,
StoneSerializer<ArgT> argSerializer) |
protected abstract DbxRawClientV2 |
withPathRoot(PathRoot pathRoot)
Clone a new DbxRawClientV2 with Dropbox-API-Path-Root header.
|
public static final java.lang.String USER_AGENT_ID
protected DbxRawClientV2(DbxRequestConfig requestConfig, DbxHost host, java.lang.String userId, PathRoot pathRoot)
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.protected abstract void addAuthHeaders(java.util.List<HttpRequestor.Header> headers)
headers
- List of request headers. Add authentication headers to this list.public abstract DbxRefreshResult refreshAccessToken() throws DbxException
DbxException
protected abstract DbxRawClientV2 withPathRoot(PathRoot pathRoot)
pathRoot
- pathRoot
object containing the content for Dropbox-API-Path-Root header.public <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
DbxWrappedException
DbxException
public <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
DbxWrappedException
DbxException
public <ArgT> HttpRequestor.Uploader uploadStyle(java.lang.String host, java.lang.String path, ArgT arg, boolean noAuth, StoneSerializer<ArgT> argSerializer) throws DbxException
DbxException
public DbxRequestConfig getRequestConfig()
DbxRequestConfig
that was passed in to the constructor.public DbxHost getHost()
DbxHost
that was passed in to the constructor.public java.lang.String getUserId()
userId
that was passed in to the constructor.