public class

ClientFactory

extends Object
java.lang.Object
   ↳ com.evernote.client.android.ClientFactory

Class Overview

A class to produce User and Note store clients.

Summary

Public Methods
AsyncBusinessNoteStoreClient createBusinessNoteStoreClient()
Create a new Business NoteStore client.
void createBusinessNoteStoreClientAsync(OnClientCallback<AsyncBusinessNoteStoreClient> callback)
This is an async call to retrieve a business note store.
AsyncLinkedNoteStoreClient createLinkedNoteStoreClient(LinkedNotebook linkedNotebook)
Creates a LinkedNoteStoreClient from a LinkedNotebook synchronously
void createLinkedNoteStoreClientAsync(LinkedNotebook notebook, OnClientCallback<AsyncLinkedNoteStoreClient> callback)
Creates a LinkedNoteStoreClient from a LinkedNotebook asynchronously
AsyncNoteStoreClient createNoteStoreClient()
Create a new NoteStore client.
AsyncUserStoreClient createUserStoreClient()
Create a new UserStore client.
Map<String, String> getCustomHeaders()
if non-null, this is a mapping of HTTP headers to values which will be included in the request.
File getTempDir()
a temporary directory in which large outgoing Thrift messages will be cached to disk before they are sent
String getUserAgent()
The user agent defined for the connection
void setCustomHeaders(Map<String, String> mCustomHeaders)
Allows custom headers to be defined for the Client connection
void setTempDir(File mTempDir)
sets the temporary directory in which large outgoing Thrift messages will be cached to disk before they are sent
void setUserAgent(String mUserAgent)
Set a custom UserAgent String for the client connection
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public AsyncBusinessNoteStoreClient createBusinessNoteStoreClient ()

Create a new Business NoteStore client. Each call to this method will return a new NoteStore.Client instance. The returned client can be used for any number of API calls, but is NOT thread safe. This method will check expiration time for the business authorization token, this is a network request This method is synchronous

Throws
TException
EDAMUserException
EDAMSystemException User is not part of a business
EDAMUserException
TException

public void createBusinessNoteStoreClientAsync (OnClientCallback<AsyncBusinessNoteStoreClient> callback)

This is an async call to retrieve a business note store.

Parameters
callback to receive results from creating NoteStore

public AsyncLinkedNoteStoreClient createLinkedNoteStoreClient (LinkedNotebook linkedNotebook)

Creates a LinkedNoteStoreClient from a LinkedNotebook synchronously

Throws
EDAMNotFoundException
EDAMSystemException
EDAMUserException
TException

public void createLinkedNoteStoreClientAsync (LinkedNotebook notebook, OnClientCallback<AsyncLinkedNoteStoreClient> callback)

Creates a LinkedNoteStoreClient from a LinkedNotebook asynchronously

public AsyncNoteStoreClient createNoteStoreClient ()

Create a new NoteStore client. Each call to this method will return a new NoteStore.Client instance. The returned client can be used for any number of API calls, but is NOT thread safe.

Throws
IllegalStateException if @link #isLoggedIn() is false.
TTransportException if an error occurs setting up the connection to the Evernote service.

public AsyncUserStoreClient createUserStoreClient ()

Create a new UserStore client. Each call to this method will return a new UserStore.Client instance. The returned client can be used for any number of API calls, but is NOT thread safe.

Throws
IllegalStateException if @link #isLoggedIn() is false.
TTransportException if an error occurs setting up the connection to the Evernote service.

public Map<String, String> getCustomHeaders ()

if non-null, this is a mapping of HTTP headers to values which will be included in the request.

public File getTempDir ()

a temporary directory in which large outgoing Thrift messages will be cached to disk before they are sent

public String getUserAgent ()

The user agent defined for the connection

public void setCustomHeaders (Map<String, String> mCustomHeaders)

Allows custom headers to be defined for the Client connection

public void setTempDir (File mTempDir)

sets the temporary directory in which large outgoing Thrift messages will be cached to disk before they are sent

public void setUserAgent (String mUserAgent)

Set a custom UserAgent String for the client connection