public class DbxClientWrapper extends java.lang.Object implements ClientWrapper
Modifier and Type | Field and Description |
---|---|
protected com.dropbox.core.DbxClient |
dbxClient
The low-level client.
|
protected org.apache.commons.vfs2.FileSystemOptions |
fileSystemOptions
The file system options.
|
protected DbxFileProvider |
provider
The file provider.
|
protected org.apache.commons.vfs2.provider.GenericFileName |
root
The root file name.
|
protected VFSLib |
vfsLib
The parental object.
|
Constructor and Description |
---|
DbxClientWrapper()
Constructor method (do not use).
|
Modifier and Type | Method and Description |
---|---|
protected void |
createClient()
Establish connection to Dropbox based on the configured options.
|
boolean |
disconnectClient()
Let's the underlying client disconnect from the server.
|
protected com.dropbox.core.DbxClient |
getClient()
Provides access to the internal Dropbox client.
|
static java.lang.String |
getClientURLID(org.apache.commons.vfs2.provider.GenericFileName root,
org.apache.commons.vfs2.FileSystemOptions options,
VFSLib vfslib)
Provides a textual representation for this connection.
|
static DbxClientWrapper |
getDbxClientWrapper(org.apache.commons.vfs2.provider.GenericFileName root,
org.apache.commons.vfs2.FileSystemOptions options,
VFSLib vfslib,
DbxFileProvider provider)
Gets an idle client from the pool or creates a fresh new instance.
|
java.lang.String |
getURLID()
Provides the unique URL identifier used to manage this client instance.
|
java.lang.String |
toString()
Provides a textual representation.
|
static void |
unlockDbxClientWrapper(DbxClientWrapper wrapper)
Releases the given client from the pool.
|
protected org.apache.commons.vfs2.provider.GenericFileName root
protected org.apache.commons.vfs2.FileSystemOptions fileSystemOptions
protected VFSLib vfsLib
protected DbxFileProvider provider
protected com.dropbox.core.DbxClient dbxClient
public DbxClientWrapper() throws java.lang.InstantiationException
java.lang.InstantiationException
- Error indicationprotected void createClient() throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemException
- If something goes wrongprotected com.dropbox.core.DbxClient getClient()
public boolean disconnectClient()
disconnectClient
in interface ClientWrapper
public java.lang.String getURLID()
getURLID
in interface ClientWrapper
public static DbxClientWrapper getDbxClientWrapper(org.apache.commons.vfs2.provider.GenericFileName root, org.apache.commons.vfs2.FileSystemOptions options, VFSLib vfslib, DbxFileProvider provider) throws org.apache.commons.vfs2.FileSystemException
root
- The root pathoptions
- The file system optionsvfslib
- The parental object, shared instance if null
provider
- The file providerorg.apache.commons.vfs2.FileSystemException
- If an I/O error occurspublic static void unlockDbxClientWrapper(DbxClientWrapper wrapper)
wrapper
- The wrapperpublic java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String getClientURLID(org.apache.commons.vfs2.provider.GenericFileName root, org.apache.commons.vfs2.FileSystemOptions options, VFSLib vfslib)
root
- The root pathoptions
- The file system optionsvfslib
- The parental object, shared instance if null
Copyright © 2005-2023 Leisenfels GmbH. All rights reserved.