A B C D E F G H I J K L M N O P Q R S T U V W 

A

add(Request<T>) - Method in class org.djodjo.comm.jus.RequestQueue
Adds a Request to the dispatch queue.
addMarker(String) - Method in class org.djodjo.comm.jus.Request
Adds an event to this request's event log; for debugging.
addRequestFinishedListener(RequestQueue.RequestFinishedListener<T>) - Method in class org.djodjo.comm.jus.RequestQueue
 
AndroidAuthenticator - Class in org.djodjo.comm.jus.auth
An Authenticator that uses AccountManager to get auth tokens of a specified type for a specified account.
AndroidAuthenticator(Context, Account, String) - Constructor for class org.djodjo.comm.jus.auth.AndroidAuthenticator
Creates a new authenticator.
AndroidAuthenticator(Context, Account, String, boolean) - Constructor for class org.djodjo.comm.jus.auth.AndroidAuthenticator
Creates a new authenticator.
apply(Request<?>) - Method in interface org.djodjo.comm.jus.RequestQueue.RequestFilter
 
ASCII - Static variable in class org.djodjo.comm.jus.http.HTTP
 
Authenticator - Interface in org.djodjo.comm.jus.auth
An interface for interacting with auth tokens.
authenticator - Variable in class org.djodjo.comm.jus.toolbox.BasicNetwork
 
AuthenticatorError - Exception in org.djodjo.comm.jus.error
Error indicating that there was an authentication failure when performing a Request.
AuthenticatorError(Intent) - Constructor for exception org.djodjo.comm.jus.error.AuthenticatorError
 
AuthenticatorError(Throwable) - Constructor for exception org.djodjo.comm.jus.error.AuthenticatorError
 
AuthenticatorError(String, Throwable) - Constructor for exception org.djodjo.comm.jus.error.AuthenticatorError
 
AuthenticatorError(String) - Constructor for exception org.djodjo.comm.jus.error.AuthenticatorError
 
AuthFailureError - Exception in org.djodjo.comm.jus.error
Error indicating that there was an authentication failure when performing a Request.
AuthFailureError(Intent) - Constructor for exception org.djodjo.comm.jus.error.AuthFailureError
 
AuthFailureError(NetworkResponse) - Constructor for exception org.djodjo.comm.jus.error.AuthFailureError
 
AuthFailureError(NetworkResponse, Intent) - Constructor for exception org.djodjo.comm.jus.error.AuthFailureError
 
AuthFailureError(Throwable) - Constructor for exception org.djodjo.comm.jus.error.AuthFailureError
 
AuthFailureError(String, Throwable) - Constructor for exception org.djodjo.comm.jus.error.AuthFailureError
 
AuthFailureError(String) - Constructor for exception org.djodjo.comm.jus.error.AuthFailureError
 
authToken - Variable in class org.djodjo.comm.jus.toolbox.BasicNetwork
 

B

BasicNetwork - Class in org.djodjo.comm.jus.toolbox
A network performing Jus requests over an HttpStack.
BasicNetwork(HttpStack) - Constructor for class org.djodjo.comm.jus.toolbox.BasicNetwork
 
BasicNetwork(HttpStack, ByteArrayPool, Authenticator) - Constructor for class org.djodjo.comm.jus.toolbox.BasicNetwork
 
BUF_COMPARATOR - Static variable in class org.djodjo.comm.jus.toolbox.ByteArrayPool
Compares buffers by size
ByteArrayPool - Class in org.djodjo.comm.jus.toolbox
ByteArrayPool is a source and repository of byte[] objects.
ByteArrayPool(int) - Constructor for class org.djodjo.comm.jus.toolbox.ByteArrayPool
 

C

Cache - Interface in org.djodjo.comm.jus
An interface for a cache keyed by a String with a byte array as data.
Cache.Entry - Class in org.djodjo.comm.jus
Data and metadata for an entry returned by the cache.
Cache.Entry() - Constructor for class org.djodjo.comm.jus.Cache.Entry
 
CacheDispatcher - Class in org.djodjo.comm.jus
Provides a thread for performing cache triage on a queue of requests.
CacheDispatcher(BlockingQueue<Request<?>>, BlockingQueue<Request<?>>, Cache, ResponseDelivery) - Constructor for class org.djodjo.comm.jus.CacheDispatcher
Creates a new cache triage dispatcher thread.
cacheEntry - Variable in class org.djodjo.comm.jus.Response
Cache metadata for this response, or null in the case of error.
cancel() - Method in class org.djodjo.comm.jus.Request
Mark this request as canceled.
cancel(boolean) - Method in class org.djodjo.comm.jus.request.RequestFuture
 
cancelAll(RequestQueue.RequestFilter) - Method in class org.djodjo.comm.jus.RequestQueue
Cancels all requests in this queue for which the given filter applies.
cancelAll(Object) - Method in class org.djodjo.comm.jus.RequestQueue
Cancels all requests in this queue with the given tag.
CHARSET_PARAM - Static variable in class org.djodjo.comm.jus.http.HTTP
 
CHUNK_CODING - Static variable in class org.djodjo.comm.jus.http.HTTP
Transfer encoding definitions
clear() - Method in interface org.djodjo.comm.jus.Cache
Empties the cache.
clear() - Method in class org.djodjo.comm.jus.toolbox.DiskBasedCache
Clears the cache.
clear() - Method in class org.djodjo.comm.jus.toolbox.NoCache
 
ClearCacheRequest - Class in org.djodjo.comm.jus.request
A synthetic request used for clearing the cache.
ClearCacheRequest(Cache, Runnable) - Constructor for class org.djodjo.comm.jus.request.ClearCacheRequest
Creates a synthetic request for clearing the cache.
close() - Method in class org.djodjo.comm.jus.toolbox.PoolingByteArrayOutputStream
 
compareTo(Request<T>) - Method in class org.djodjo.comm.jus.Request
Our comparator sorts from high to low priority, and secondarily by sequence number to provide FIFO ordering.
CONN_CLOSE - Static variable in class org.djodjo.comm.jus.http.HTTP
HTTP connection control
CONN_DIRECTIVE - Static variable in class org.djodjo.comm.jus.http.HTTP
 
CONN_KEEP_ALIVE - Static variable in class org.djodjo.comm.jus.http.HTTP
 
CONTENT_ENCODING - Static variable in class org.djodjo.comm.jus.http.HTTP
 
CONTENT_LEN - Static variable in class org.djodjo.comm.jus.http.HTTP
 
CONTENT_TYPE - Static variable in class org.djodjo.comm.jus.http.HTTP
 
CR - Static variable in class org.djodjo.comm.jus.http.HTTP
 
createConnection(URL) - Method in class org.djodjo.comm.jus.stack.HurlStack
Create an HttpURLConnection for the specified url.

D

d(String, Object...) - Static method in class org.djodjo.comm.jus.JusLog
 
data - Variable in class org.djodjo.comm.jus.Cache.Entry
The data returned from cache.
data - Variable in class org.djodjo.comm.jus.NetworkResponse
Raw data from this response.
DATE_HEADER - Static variable in class org.djodjo.comm.jus.http.HTTP
 
DateParseException - Exception in org.djodjo.comm.jus.http
An exception to indicate an error parsing a date string.
DateParseException() - Constructor for exception org.djodjo.comm.jus.http.DateParseException
 
DateParseException(String) - Constructor for exception org.djodjo.comm.jus.http.DateParseException
 
DateUtils - Class in org.djodjo.comm.jus.http
A utility class for parsing and formatting HTTP dates as used in cookies and other headers.
DEBUG - Static variable in class org.djodjo.comm.jus.CacheDispatcher
 
DEBUG - Static variable in class org.djodjo.comm.jus.JusLog
 
DEBUG - Static variable in class org.djodjo.comm.jus.toolbox.BasicNetwork
 
DEFAULT_BACKOFF_MULT - Static variable in class org.djodjo.comm.jus.DefaultRetryPolicy
The default backoff multiplier
DEFAULT_CONTENT_CHARSET - Static variable in class org.djodjo.comm.jus.http.HTTP
Default charsets
DEFAULT_CONTENT_TYPE - Static variable in class org.djodjo.comm.jus.http.HTTP
Default content type
DEFAULT_MAX_RETRIES - Static variable in class org.djodjo.comm.jus.DefaultRetryPolicy
The default number of retries
DEFAULT_NETWORK_THREAD_POOL_SIZE - Static variable in class org.djodjo.comm.jus.RequestQueue
Number of network request dispatcher threads to start.
DEFAULT_PROTOCOL_CHARSET - Static variable in class org.djodjo.comm.jus.http.HTTP
 
DEFAULT_TIMEOUT_MS - Static variable in class org.djodjo.comm.jus.DefaultRetryPolicy
The default socket timeout in milliseconds
DefaultRetryPolicy - Class in org.djodjo.comm.jus
Default retry policy for requests.
DefaultRetryPolicy() - Constructor for class org.djodjo.comm.jus.DefaultRetryPolicy
Constructs a new retry policy using the default timeouts.
DefaultRetryPolicy(int, int, float) - Constructor for class org.djodjo.comm.jus.DefaultRetryPolicy
Constructs a new retry policy.
DELETE - Static variable in interface org.djodjo.comm.jus.Request.Method
 
deliverError(JusError) - Method in class org.djodjo.comm.jus.Request
Delivers error message to the ErrorListener that the Request was initialized with.
deliverResponse(Object) - Method in class org.djodjo.comm.jus.request.ClearCacheRequest
 
deliverResponse(T) - Method in class org.djodjo.comm.jus.Request
Subclasses must implement this to perform delivery of the parsed response to their listeners.
deliverResponse(Bitmap) - Method in class org.djodjo.comm.jus.request.ImageRequest
 
deliverResponse(T) - Method in class org.djodjo.comm.jus.request.JsonRequest
 
deliverResponse(String) - Method in class org.djodjo.comm.jus.request.StringRequest
 
DiskBasedCache - Class in org.djodjo.comm.jus.toolbox
Cache implementation that caches files directly onto the hard disk in the specified directory.
DiskBasedCache(File, int) - Constructor for class org.djodjo.comm.jus.toolbox.DiskBasedCache
Constructs an instance of the DiskBasedCache at the specified directory.
DiskBasedCache(File) - Constructor for class org.djodjo.comm.jus.toolbox.DiskBasedCache
Constructs an instance of the DiskBasedCache at the specified directory using the default maximum cache size of 5MB.

E

e(String, Object...) - Static method in class org.djodjo.comm.jus.JusLog
 
e(Throwable, String, Object...) - Static method in class org.djodjo.comm.jus.JusLog
 
error - Variable in class org.djodjo.comm.jus.Response
Detailed error information if errorCode != OK.
error(JusError) - Static method in class org.djodjo.comm.jus.Response
Returns a failed response containing the given error code and an optional localized message displayed to the user.
etag - Variable in class org.djodjo.comm.jus.Cache.Entry
ETag for cache coherency.
ExecutorDelivery - Class in org.djodjo.comm.jus
Delivers responses and errors.
ExecutorDelivery(Handler) - Constructor for class org.djodjo.comm.jus.ExecutorDelivery
Creates a new response delivery interface.
ExecutorDelivery(Executor) - Constructor for class org.djodjo.comm.jus.ExecutorDelivery
Creates a new response delivery interface, mockable version for testing.
EXPECT_CONTINUE - Static variable in class org.djodjo.comm.jus.http.HTTP
HTTP expectations
EXPECT_DIRECTIVE - Static variable in class org.djodjo.comm.jus.http.HTTP
 

F

finalize() - Method in class org.djodjo.comm.jus.toolbox.PoolingByteArrayOutputStream
 
finish(String) - Method in class org.djodjo.comm.jus.Request
Notifies the request queue that this request has finished (successfully or with error).
ForbiddenError - Exception in org.djodjo.comm.jus.error
Error indicating that there was an authentication failure when performing a Request.
ForbiddenError(Intent) - Constructor for exception org.djodjo.comm.jus.error.ForbiddenError
 
ForbiddenError(NetworkResponse) - Constructor for exception org.djodjo.comm.jus.error.ForbiddenError
 
ForbiddenError(Throwable, Request<?>) - Constructor for exception org.djodjo.comm.jus.error.ForbiddenError
 
ForbiddenError(String, Throwable) - Constructor for exception org.djodjo.comm.jus.error.ForbiddenError
 
ForbiddenError(String, Request<?>) - Constructor for exception org.djodjo.comm.jus.error.ForbiddenError
 
ForbiddenError(Request<?>) - Constructor for exception org.djodjo.comm.jus.error.ForbiddenError
 
formatDate(Date) - Static method in class org.djodjo.comm.jus.http.DateUtils
Formats the given date according to the RFC 1123 pattern.
formatDate(Date, String) - Static method in class org.djodjo.comm.jus.http.DateUtils
Formats the given date according to the specified pattern.

G

get(String) - Method in interface org.djodjo.comm.jus.Cache
Retrieves an entry from the cache.
GET - Static variable in interface org.djodjo.comm.jus.Request.Method
 
get() - Method in class org.djodjo.comm.jus.request.RequestFuture
 
get(long, TimeUnit) - Method in class org.djodjo.comm.jus.request.RequestFuture
 
get(String) - Method in class org.djodjo.comm.jus.toolbox.DiskBasedCache
Returns the cache entry with the specified key if it exists, null otherwise.
get(String) - Method in class org.djodjo.comm.jus.toolbox.NoCache
 
getAccount() - Method in class org.djodjo.comm.jus.auth.AndroidAuthenticator
Returns the Account being used by this authenticator.
getAuthToken() - Method in class org.djodjo.comm.jus.auth.AndroidAuthenticator
 
getAuthToken() - Method in interface org.djodjo.comm.jus.auth.Authenticator
Synchronously retrieves an auth token.
getBackoffMultiplier() - Method in class org.djodjo.comm.jus.DefaultRetryPolicy
Returns the backoff multiplier for the policy.
getBody() - Method in class org.djodjo.comm.jus.Request
Returns the raw POST or PUT body to be sent.
getBody() - Method in class org.djodjo.comm.jus.request.JsonRequest
 
getBodyContentType() - Method in class org.djodjo.comm.jus.Request
Returns the content type of the POST or PUT body.
getBodyContentType() - Method in class org.djodjo.comm.jus.request.JsonRequest
 
getBuf(int) - Method in class org.djodjo.comm.jus.toolbox.ByteArrayPool
Returns a buffer from the pool if one is available in the requested size, or allocates a new one if a pooled one is not available.
getCache() - Method in class org.djodjo.comm.jus.RequestQueue
Gets the Cache instance being used.
getCacheEntry() - Method in class org.djodjo.comm.jus.Request
Returns the annotated cache entry, or null if there isn't one.
getCacheKey() - Method in class org.djodjo.comm.jus.Request
Returns the cache key for this request.
getCurrentRequests() - Method in class org.djodjo.comm.jus.RequestQueue
 
getCurrentRetryCount() - Method in class org.djodjo.comm.jus.DefaultRetryPolicy
Returns the current retry count.
getCurrentRetryCount() - Method in interface org.djodjo.comm.jus.RetryPolicy
Returns the current retry count (used for logging).
getCurrentTimeout() - Method in class org.djodjo.comm.jus.DefaultRetryPolicy
Returns the current timeout.
getCurrentTimeout() - Method in interface org.djodjo.comm.jus.RetryPolicy
Returns the current timeout (used for logging).
getErrorListener() - Method in class org.djodjo.comm.jus.Request
 
getFileForKey(String) - Method in class org.djodjo.comm.jus.toolbox.DiskBasedCache
Returns a file object for the given cache key.
getHeaders() - Method in class org.djodjo.comm.jus.Request
Returns a list of extra HTTP headers to go along with this request.
getHeaders() - Method in class org.djodjo.comm.jus.request.TokenRequest
 
getMessage() - Method in exception org.djodjo.comm.jus.error.AuthenticatorError
 
getMessage() - Method in exception org.djodjo.comm.jus.error.AuthFailureError
 
getMessage() - Method in exception org.djodjo.comm.jus.error.ForbiddenError
 
getMethod() - Method in class org.djodjo.comm.jus.Request
Return the method for this request.
getNetworkTimeMs() - Method in exception org.djodjo.comm.jus.error.JusError
 
getParams() - Method in class org.djodjo.comm.jus.Request
Returns a Map of parameters to be used for a POST or PUT request.
getParams() - Method in class org.djodjo.comm.jus.request.TokenRequest
 
getParamsEncoding() - Method in class org.djodjo.comm.jus.Request
Returns which encoding should be used when converting POST or PUT parameters returned by Request.getParams() into a raw POST or PUT body.
getPostParams() - Method in class org.djodjo.comm.jus.Request
Deprecated.
Use Request.getParams() instead.
getPriority() - Method in class org.djodjo.comm.jus.request.ClearCacheRequest
 
getPriority() - Method in class org.djodjo.comm.jus.Request
Returns the Request.Priority of this request; Request.Priority.NORMAL by default.
getPriority() - Method in class org.djodjo.comm.jus.request.ImageRequest
 
getResolutionIntent() - Method in exception org.djodjo.comm.jus.error.AuthenticatorError
 
getResolutionIntent() - Method in exception org.djodjo.comm.jus.error.AuthFailureError
 
getResolutionIntent() - Method in exception org.djodjo.comm.jus.error.ForbiddenError
 
getRetryPolicy() - Method in class org.djodjo.comm.jus.Request
Returns the retry policy that should be used for this request.
getSequence() - Method in class org.djodjo.comm.jus.Request
Returns the sequence number of this request.
getSequenceNumber() - Method in class org.djodjo.comm.jus.RequestQueue
Gets a sequence number.
getTag() - Method in class org.djodjo.comm.jus.Request
Returns this request's tag.
getTimeoutMs() - Method in class org.djodjo.comm.jus.Request
Returns the socket timeout in milliseconds per retry attempt.
getTrafficStatsTag() - Method in class org.djodjo.comm.jus.Request
 
getUrl() - Method in class org.djodjo.comm.jus.Request
Returns the URL of this request.
getWaitingRequests() - Method in class org.djodjo.comm.jus.RequestQueue
 
GMT - Static variable in class org.djodjo.comm.jus.http.DateUtils
 

H

hasAttemptRemaining() - Method in class org.djodjo.comm.jus.DefaultRetryPolicy
Returns true if this policy has attempts remaining, false otherwise.
hasHadResponseDelivered() - Method in class org.djodjo.comm.jus.Request
Returns true if this request has had a response delivered for it.
HEAD - Static variable in interface org.djodjo.comm.jus.Request.Method
 
headers - Variable in class org.djodjo.comm.jus.NetworkResponse
Response headers.
HT - Static variable in class org.djodjo.comm.jus.http.HTTP
 
HTTP - Class in org.djodjo.comm.jus.http
Constants and static helpers related to the HTTP protocol.
HttpHeaderParser - Class in org.djodjo.comm.jus.toolbox
Utility methods for parsing HTTP headers.
HttpHeaderParser() - Constructor for class org.djodjo.comm.jus.toolbox.HttpHeaderParser
 
HttpStack - Interface in org.djodjo.comm.jus.stack
An HTTP stack abstraction.
HurlStack - Class in org.djodjo.comm.jus.stack
An HttpStack based on HttpURLConnection.
HurlStack() - Constructor for class org.djodjo.comm.jus.stack.HurlStack
 
HurlStack(HurlStack.UrlRewriter) - Constructor for class org.djodjo.comm.jus.stack.HurlStack
 
HurlStack(HurlStack.UrlRewriter, SSLSocketFactory) - Constructor for class org.djodjo.comm.jus.stack.HurlStack
 
HurlStack.UrlRewriter - Interface in org.djodjo.comm.jus.stack
An interface for transforming URLs before use.

I

IDENTITY_CODING - Static variable in class org.djodjo.comm.jus.http.HTTP
 
ImageRequest - Class in org.djodjo.comm.jus.request
A canned request for getting an image at a given URL and calling back with a decoded Bitmap.
ImageRequest(String, Response.Listener<Bitmap>, int, int, ImageView.ScaleType, Bitmap.Config, Response.ErrorListener) - Constructor for class org.djodjo.comm.jus.request.ImageRequest
Creates a new image request, decoding to a maximum specified width and height.
ImageRequest(String, Response.Listener<Bitmap>, int, int, Bitmap.Config, Response.ErrorListener) - Constructor for class org.djodjo.comm.jus.request.ImageRequest
Deprecated.
initialize() - Method in interface org.djodjo.comm.jus.Cache
Performs any potentially long-running actions needed to initialize the cache; will be called from a worker thread.
initialize() - Method in class org.djodjo.comm.jus.toolbox.DiskBasedCache
Initializes the DiskBasedCache by scanning for all files currently in the specified root directory.
initialize() - Method in class org.djodjo.comm.jus.toolbox.NoCache
 
intermediate - Variable in class org.djodjo.comm.jus.Response
True if this response was a soft-expired one and a second one MAY be coming.
invalidate(String, boolean) - Method in interface org.djodjo.comm.jus.Cache
Invalidates an entry in the cache.
invalidate(String, boolean) - Method in class org.djodjo.comm.jus.toolbox.DiskBasedCache
Invalidates an entry in the cache.
invalidate(String, boolean) - Method in class org.djodjo.comm.jus.toolbox.NoCache
 
invalidateAuthToken(String) - Method in class org.djodjo.comm.jus.auth.AndroidAuthenticator
 
invalidateAuthToken(String) - Method in interface org.djodjo.comm.jus.auth.Authenticator
Invalidates the provided auth token.
isCanceled() - Method in class org.djodjo.comm.jus.request.ClearCacheRequest
 
isCanceled() - Method in class org.djodjo.comm.jus.Request
Returns true if this request has been canceled.
isCancelled() - Method in class org.djodjo.comm.jus.request.RequestFuture
 
isDone() - Method in class org.djodjo.comm.jus.request.RequestFuture
 
isExpired() - Method in class org.djodjo.comm.jus.Cache.Entry
True if the entry is expired.
ISO_8859_1 - Static variable in class org.djodjo.comm.jus.http.HTTP
 
isSuccess() - Method in class org.djodjo.comm.jus.Response
Returns whether this response is considered successful.
isWhitespace(char) - Static method in class org.djodjo.comm.jus.http.HTTP
 

J

JsonArrayRequest - Class in org.djodjo.comm.jus.request
A request for retrieving a JSONArray response body at a given URL.
JsonArrayRequest(String, Response.Listener<JSONArray>, Response.ErrorListener) - Constructor for class org.djodjo.comm.jus.request.JsonArrayRequest
Creates a new request.
JsonObjectRequest - Class in org.djodjo.comm.jus.request
A request for retrieving a JSONObject response body at a given URL, allowing for an optional JSONObject to be passed in as part of the request body.
JsonObjectRequest(int, String, JSONObject, Response.Listener<JSONObject>, Response.ErrorListener) - Constructor for class org.djodjo.comm.jus.request.JsonObjectRequest
Creates a new request.
JsonObjectRequest(String, JSONObject, Response.Listener<JSONObject>, Response.ErrorListener) - Constructor for class org.djodjo.comm.jus.request.JsonObjectRequest
Constructor which defaults to GET if jsonRequest is null, POST otherwise.
JsonRequest<T> - Class in org.djodjo.comm.jus.request
A request for retrieving a T type response body at a given URL that also optionally sends along a JSON body in the request specified.
JsonRequest(int, String, String, Response.Listener<T>, Response.ErrorListener) - Constructor for class org.djodjo.comm.jus.request.JsonRequest
 
Jus - Class in org.djodjo.comm.jus
 
Jus() - Constructor for class org.djodjo.comm.jus.Jus
 
JusError - Exception in org.djodjo.comm.jus.error
Exception style class encapsulating Jus errors
JusError() - Constructor for exception org.djodjo.comm.jus.error.JusError
 
JusError(NetworkResponse) - Constructor for exception org.djodjo.comm.jus.error.JusError
 
JusError(String) - Constructor for exception org.djodjo.comm.jus.error.JusError
 
JusError(String, Throwable) - Constructor for exception org.djodjo.comm.jus.error.JusError
 
JusError(Throwable) - Constructor for exception org.djodjo.comm.jus.error.JusError
 
JusLog - Class in org.djodjo.comm.jus
Logging helper class.
JusLog() - Constructor for class org.djodjo.comm.jus.JusLog
 

K

key - Variable in class org.djodjo.comm.jus.request.TokenRequest
 

L

lastModified - Variable in class org.djodjo.comm.jus.Cache.Entry
The last modified date for the requested object.
LF - Static variable in class org.djodjo.comm.jus.http.HTTP
 
logError(String, String, long) - Method in class org.djodjo.comm.jus.toolbox.BasicNetwork
 

M

markDelivered() - Method in class org.djodjo.comm.jus.Request
Mark this request as having a response delivered on it.
mCache - Variable in class org.djodjo.comm.jus.CacheDispatcher
The cache to read from.
mCache - Variable in class org.djodjo.comm.jus.RequestQueue
Cache interface for retrieving and storing responses.
mCacheDispatcher - Variable in class org.djodjo.comm.jus.RequestQueue
The cache dispatcher.
mCacheQueue - Variable in class org.djodjo.comm.jus.CacheDispatcher
The queue of requests coming in for triage.
mCacheQueue - Variable in class org.djodjo.comm.jus.RequestQueue
The cache triage queue.
mDelivery - Variable in class org.djodjo.comm.jus.CacheDispatcher
For posting responses.
mDelivery - Variable in class org.djodjo.comm.jus.RequestQueue
Response delivery mechanism.
mDispatchers - Variable in class org.djodjo.comm.jus.RequestQueue
The network dispatchers.
mHttpStack - Variable in class org.djodjo.comm.jus.toolbox.BasicNetwork
 
mNetwork - Variable in class org.djodjo.comm.jus.RequestQueue
Network interface for performing requests.
mNetworkQueue - Variable in class org.djodjo.comm.jus.CacheDispatcher
The queue of requests going out to the network.
mNetworkQueue - Variable in class org.djodjo.comm.jus.RequestQueue
The queue of requests that are actually going out to the network.
mPool - Variable in class org.djodjo.comm.jus.toolbox.BasicNetwork
 
mQuit - Variable in class org.djodjo.comm.jus.CacheDispatcher
Used for telling us to die.

N

Network - Interface in org.djodjo.comm.jus
An interface for performing requests.
NetworkDispatcher - Class in org.djodjo.comm.jus
Provides a thread for performing network dispatch from a queue of requests.
NetworkDispatcher(BlockingQueue<Request<?>>, Network, Cache, ResponseDelivery) - Constructor for class org.djodjo.comm.jus.NetworkDispatcher
Creates a new network dispatcher thread.
NetworkError - Exception in org.djodjo.comm.jus.error
Indicates that there was a network error when performing a Jus request.
NetworkError(Throwable) - Constructor for exception org.djodjo.comm.jus.error.NetworkError
 
NetworkError(String, Throwable) - Constructor for exception org.djodjo.comm.jus.error.NetworkError
 
NetworkError(String) - Constructor for exception org.djodjo.comm.jus.error.NetworkError
 
NetworkError() - Constructor for exception org.djodjo.comm.jus.error.NetworkError
 
NetworkError(NetworkResponse) - Constructor for exception org.djodjo.comm.jus.error.NetworkError
 
networkResponse - Variable in exception org.djodjo.comm.jus.error.JusError
 
NetworkResponse - Class in org.djodjo.comm.jus
Data and headers returned from Network.performRequest(Request).
NetworkResponse(int, byte[], Map<String, String>, boolean, long) - Constructor for class org.djodjo.comm.jus.NetworkResponse
Creates a new network response.
NetworkResponse(int, byte[], Map<String, String>, boolean) - Constructor for class org.djodjo.comm.jus.NetworkResponse
 
NetworkResponse(byte[]) - Constructor for class org.djodjo.comm.jus.NetworkResponse
 
NetworkResponse(byte[], Map<String, String>) - Constructor for class org.djodjo.comm.jus.NetworkResponse
 
networkTimeMs - Variable in class org.djodjo.comm.jus.NetworkResponse
Network roundtrip time in milliseconds.
newFuture() - Static method in class org.djodjo.comm.jus.request.RequestFuture
 
newRequestQueue(Context, HttpStack) - Static method in class org.djodjo.comm.jus.Jus
Creates a default instance of the worker pool and calls RequestQueue.start() on it.
newRequestQueue(Context) - Static method in class org.djodjo.comm.jus.Jus
Creates a default instance of the worker pool and calls RequestQueue.start() on it.
NoCache - Class in org.djodjo.comm.jus.toolbox
A cache that doesn't.
NoCache() - Constructor for class org.djodjo.comm.jus.toolbox.NoCache
 
NoConnectionError - Exception in org.djodjo.comm.jus.error
Error indicating that no connection could be established when performing a Jus request.
NoConnectionError() - Constructor for exception org.djodjo.comm.jus.error.NoConnectionError
 
NoConnectionError(Throwable) - Constructor for exception org.djodjo.comm.jus.error.NoConnectionError
 
notModified - Variable in class org.djodjo.comm.jus.NetworkResponse
True if the server returned a 304 (Not Modified).

O

OCTET_STREAM_TYPE - Static variable in class org.djodjo.comm.jus.http.HTTP
Content type definitions
onErrorResponse(JusError) - Method in class org.djodjo.comm.jus.request.RequestFuture
 
onErrorResponse(JusError) - Method in interface org.djodjo.comm.jus.Response.ErrorListener
Callback method that an error has been occurred with the provided error code and optional user-readable message.
onRequestFinished(Request<T>) - Method in interface org.djodjo.comm.jus.RequestQueue.RequestFinishedListener
Called when a request has finished processing.
onResponse(T) - Method in class org.djodjo.comm.jus.request.RequestFuture
 
onResponse(T) - Method in interface org.djodjo.comm.jus.Response.Listener
Called when a response is received.
OPTIONS - Static variable in interface org.djodjo.comm.jus.Request.Method
 
org.djodjo.comm.jus - package org.djodjo.comm.jus
 
org.djodjo.comm.jus.auth - package org.djodjo.comm.jus.auth
 
org.djodjo.comm.jus.error - package org.djodjo.comm.jus.error
 
org.djodjo.comm.jus.http - package org.djodjo.comm.jus.http
 
org.djodjo.comm.jus.request - package org.djodjo.comm.jus.request
 
org.djodjo.comm.jus.stack - package org.djodjo.comm.jus.stack
 
org.djodjo.comm.jus.toolbox - package org.djodjo.comm.jus.toolbox
 

P

parseCacheHeaders(NetworkResponse) - Static method in class org.djodjo.comm.jus.toolbox.HttpHeaderParser
Extracts a Cache.Entry from a NetworkResponse.
parseCharset(Map<String, String>, String) - Static method in class org.djodjo.comm.jus.toolbox.HttpHeaderParser
Retrieve a charset from headers
parseCharset(Map<String, String>) - Static method in class org.djodjo.comm.jus.toolbox.HttpHeaderParser
Returns the charset specified in the Content-Type of this header, or the HTTP default (ISO-8859-1) if none can be found.
parseDate(String) - Static method in class org.djodjo.comm.jus.http.DateUtils
Parses a date value.
parseDate(String, String[]) - Static method in class org.djodjo.comm.jus.http.DateUtils
Parses the date value using the given date formats.
parseDate(String, String[], Date) - Static method in class org.djodjo.comm.jus.http.DateUtils
Parses the date value using the given date formats.
parseDateAsEpoch(String) - Static method in class org.djodjo.comm.jus.toolbox.HttpHeaderParser
Parse date in RFC1123 format, and return its value as epoch
ParseError - Exception in org.djodjo.comm.jus
Indicates that the server's response could not be parsed.
ParseError(Throwable) - Constructor for exception org.djodjo.comm.jus.ParseError
 
ParseError(String, Throwable) - Constructor for exception org.djodjo.comm.jus.ParseError
 
ParseError(String) - Constructor for exception org.djodjo.comm.jus.ParseError
 
ParseError() - Constructor for exception org.djodjo.comm.jus.ParseError
 
ParseError(NetworkResponse) - Constructor for exception org.djodjo.comm.jus.ParseError
 
parseNetworkError(JusError) - Method in class org.djodjo.comm.jus.Request
Subclasses can override this method to parse 'networkError' and return a more specific error.
parseNetworkResponse(NetworkResponse) - Method in class org.djodjo.comm.jus.request.ClearCacheRequest
 
parseNetworkResponse(NetworkResponse) - Method in class org.djodjo.comm.jus.request.ImageRequest
 
parseNetworkResponse(NetworkResponse) - Method in class org.djodjo.comm.jus.request.JsonArrayRequest
 
parseNetworkResponse(NetworkResponse) - Method in class org.djodjo.comm.jus.request.JsonObjectRequest
 
parseNetworkResponse(NetworkResponse) - Method in class org.djodjo.comm.jus.request.JsonRequest
 
parseNetworkResponse(NetworkResponse) - Method in class org.djodjo.comm.jus.Request
Subclasses must implement this to parse the raw network response and return an appropriate response type.
parseNetworkResponse(NetworkResponse) - Method in class org.djodjo.comm.jus.request.StringRequest
 
PATCH - Static variable in interface org.djodjo.comm.jus.Request.Method
 
PATTERN_ASCTIME - Static variable in class org.djodjo.comm.jus.http.DateUtils
Date format pattern used to parse HTTP date headers in ANSI C asctime() format.
PATTERN_RFC1036 - Static variable in class org.djodjo.comm.jus.http.DateUtils
Date format pattern used to parse HTTP date headers in RFC 1036 format.
PATTERN_RFC1123 - Static variable in class org.djodjo.comm.jus.http.DateUtils
Date format pattern used to parse HTTP date headers in RFC 1123 format.
performRequest(Request<?>) - Method in interface org.djodjo.comm.jus.Network
Performs the specified request.
performRequest(Request<?>, Map<String, String>, ByteArrayPool) - Method in interface org.djodjo.comm.jus.stack.HttpStack
Performs an HTTP request with the given parameters.
performRequest(Request<?>, Map<String, String>, ByteArrayPool) - Method in class org.djodjo.comm.jus.stack.HurlStack
 
performRequest(Request<?>) - Method in class org.djodjo.comm.jus.toolbox.BasicNetwork
 
PLAIN_TEXT_TYPE - Static variable in class org.djodjo.comm.jus.http.HTTP
 
PoolingByteArrayOutputStream - Class in org.djodjo.comm.jus.toolbox
A variation of ByteArrayOutputStream that uses a pool of byte[] buffers instead of always allocating them fresh, saving on heap churn.
PoolingByteArrayOutputStream(ByteArrayPool) - Constructor for class org.djodjo.comm.jus.toolbox.PoolingByteArrayOutputStream
Constructs a new PoolingByteArrayOutputStream with a default size.
PoolingByteArrayOutputStream(ByteArrayPool, int) - Constructor for class org.djodjo.comm.jus.toolbox.PoolingByteArrayOutputStream
Constructs a new ByteArrayOutputStream with a default size of size bytes.
POST - Static variable in interface org.djodjo.comm.jus.Request.Method
 
postError(Request<?>, JusError) - Method in class org.djodjo.comm.jus.ExecutorDelivery
 
postError(Request<?>, JusError) - Method in interface org.djodjo.comm.jus.ResponseDelivery
Posts an error for the given request.
postResponse(Request<?>, Response<?>) - Method in class org.djodjo.comm.jus.ExecutorDelivery
 
postResponse(Request<?>, Response<?>, Runnable) - Method in class org.djodjo.comm.jus.ExecutorDelivery
 
postResponse(Request<?>, Response<?>) - Method in interface org.djodjo.comm.jus.ResponseDelivery
Parses a response from the network or cache and delivers it.
postResponse(Request<?>, Response<?>, Runnable) - Method in interface org.djodjo.comm.jus.ResponseDelivery
Parses a response from the network or cache and delivers it.
PROTOCOL_CHARSET - Static variable in class org.djodjo.comm.jus.request.JsonRequest
Default charset for JSON request.
put(String, Cache.Entry) - Method in interface org.djodjo.comm.jus.Cache
Adds or replaces an entry to the cache.
PUT - Static variable in interface org.djodjo.comm.jus.Request.Method
 
put(String, Cache.Entry) - Method in class org.djodjo.comm.jus.toolbox.DiskBasedCache
Puts the entry with the specified key into the cache.
put(String, Cache.Entry) - Method in class org.djodjo.comm.jus.toolbox.NoCache
 

Q

quit() - Method in class org.djodjo.comm.jus.CacheDispatcher
Forces this dispatcher to quit immediately.
quit() - Method in class org.djodjo.comm.jus.NetworkDispatcher
Forces this dispatcher to quit immediately.

R

refreshNeeded() - Method in class org.djodjo.comm.jus.Cache.Entry
True if a refresh is needed from the original data source.
remove(String) - Method in interface org.djodjo.comm.jus.Cache
Removes an entry from the cache.
remove(String) - Method in class org.djodjo.comm.jus.toolbox.DiskBasedCache
Removes the specified key from the cache if it exists.
remove(String) - Method in class org.djodjo.comm.jus.toolbox.NoCache
 
removeRequestFinishedListener(RequestQueue.RequestFinishedListener<T>) - Method in class org.djodjo.comm.jus.RequestQueue
Remove a RequestFinishedListener.
Request<T> - Class in org.djodjo.comm.jus
Base class for all network requests.
Request(int, String, Response.ErrorListener) - Constructor for class org.djodjo.comm.jus.Request
Creates a new request with the given method (one of the values from Request.Method), URL, and error listener.
Request.Method - Interface in org.djodjo.comm.jus
Supported request methods.
Request.Priority - Enum in org.djodjo.comm.jus
Priority values.
RequestError - Exception in org.djodjo.comm.jus.error
Indicates that the server responded with an error response.
RequestError(Throwable) - Constructor for exception org.djodjo.comm.jus.error.RequestError
 
RequestError(String, Throwable) - Constructor for exception org.djodjo.comm.jus.error.RequestError
 
RequestError(String) - Constructor for exception org.djodjo.comm.jus.error.RequestError
 
RequestError() - Constructor for exception org.djodjo.comm.jus.error.RequestError
 
RequestError(NetworkResponse) - Constructor for exception org.djodjo.comm.jus.error.RequestError
 
RequestFuture<T> - Class in org.djodjo.comm.jus.request
A Future that represents a Jus request.
RequestQueue - Class in org.djodjo.comm.jus
A request dispatch queue with a thread pool of dispatchers.
RequestQueue(Cache, Network, int, ResponseDelivery) - Constructor for class org.djodjo.comm.jus.RequestQueue
Creates the worker pool.
RequestQueue(Cache, Network, int) - Constructor for class org.djodjo.comm.jus.RequestQueue
Creates the worker pool.
RequestQueue(Cache, Network) - Constructor for class org.djodjo.comm.jus.RequestQueue
Creates the worker pool.
RequestQueue.RequestFilter - Interface in org.djodjo.comm.jus
A simple predicate or filter interface for Requests, for use by RequestQueue.cancelAll(RequestFilter).
RequestQueue.RequestFinishedListener<T> - Interface in org.djodjo.comm.jus
Callback interface for completed requests.
Response<T> - Class in org.djodjo.comm.jus
Encapsulates a parsed response for delivery.
Response.ErrorListener - Interface in org.djodjo.comm.jus
Callback interface for delivering error responses.
Response.Listener<T> - Interface in org.djodjo.comm.jus
Callback interface for delivering parsed responses.
ResponseDelivery - Interface in org.djodjo.comm.jus
 
responseHeaders - Variable in class org.djodjo.comm.jus.Cache.Entry
Immutable response headers as received from server; must be non-null.
result - Variable in class org.djodjo.comm.jus.Response
Parsed response, or null in the case of error.
retry(JusError) - Method in class org.djodjo.comm.jus.DefaultRetryPolicy
Prepares for the next retry by applying a backoff to the timeout.
retry(JusError) - Method in interface org.djodjo.comm.jus.RetryPolicy
Prepares for the next retry by applying a backoff to the timeout.
RetryPolicy - Interface in org.djodjo.comm.jus
Retry policy for a request.
returnBuf(byte[]) - Method in class org.djodjo.comm.jus.toolbox.ByteArrayPool
Returns a buffer to the pool, throwing away old buffers if the pool would exceed its allotted size.
rewriteUrl(String) - Method in interface org.djodjo.comm.jus.stack.HurlStack.UrlRewriter
Returns a URL to use instead of the provided one, or null to indicate this URL should not be used at all.
run() - Method in class org.djodjo.comm.jus.CacheDispatcher
 
run() - Method in class org.djodjo.comm.jus.NetworkDispatcher
 

S

secret - Variable in class org.djodjo.comm.jus.request.TokenRequest
 
SERVER_HEADER - Static variable in class org.djodjo.comm.jus.http.HTTP
 
serverDate - Variable in class org.djodjo.comm.jus.Cache.Entry
Date of this response as reported by the server.
ServerError - Exception in org.djodjo.comm.jus.error
Indicates that the server responded with an error response.
ServerError(Throwable) - Constructor for exception org.djodjo.comm.jus.error.ServerError
 
ServerError(String, Throwable) - Constructor for exception org.djodjo.comm.jus.error.ServerError
 
ServerError(String) - Constructor for exception org.djodjo.comm.jus.error.ServerError
 
ServerError() - Constructor for exception org.djodjo.comm.jus.error.ServerError
 
ServerError(Request<?>, NetworkResponse) - Constructor for exception org.djodjo.comm.jus.error.ServerError
 
setCacheEntry(Cache.Entry) - Method in class org.djodjo.comm.jus.Request
Annotates this request with an entry retrieved for it from cache.
setNetworkTimeMs(long) - Method in exception org.djodjo.comm.jus.error.JusError
 
setRequest(Request<?>) - Method in class org.djodjo.comm.jus.request.RequestFuture
 
setRequestQueue(RequestQueue) - Method in class org.djodjo.comm.jus.Request
Associates this request with the given queue.
setRetryPolicy(RetryPolicy) - Method in class org.djodjo.comm.jus.Request
Sets the retry policy for this request.
setSequence(int) - Method in class org.djodjo.comm.jus.Request
Sets the sequence number of this request.
setShouldCache(boolean) - Method in class org.djodjo.comm.jus.Request
Set whether or not responses to this request should be cached.
setTag(String) - Static method in class org.djodjo.comm.jus.JusLog
Customize the log tag for your application, so that other apps using Jus don't mix their logs with yours.
setTag(Object) - Method in class org.djodjo.comm.jus.Request
Set a tag on this request.
shouldCache() - Method in class org.djodjo.comm.jus.Request
Returns true if responses to this request should be cached.
softTtl - Variable in class org.djodjo.comm.jus.Cache.Entry
Soft TTL for this record.
SP - Static variable in class org.djodjo.comm.jus.http.HTTP
 
start() - Method in class org.djodjo.comm.jus.RequestQueue
Starts the dispatchers in this queue.
statusCode - Variable in class org.djodjo.comm.jus.NetworkResponse
The HTTP status code.
stop() - Method in class org.djodjo.comm.jus.RequestQueue
Stops the cache and network dispatchers.
StringRequest - Class in org.djodjo.comm.jus.request
A canned request for retrieving the response body at a given URL as a String.
StringRequest(int, String, Response.Listener<String>, Response.ErrorListener) - Constructor for class org.djodjo.comm.jus.request.StringRequest
Creates a new request with the given method.
StringRequest(String, Response.Listener<String>, Response.ErrorListener) - Constructor for class org.djodjo.comm.jus.request.StringRequest
Creates a new GET request.
success(T, Cache.Entry) - Static method in class org.djodjo.comm.jus.Response
Returns a successful response containing the parsed result.

T

TAG - Static variable in class org.djodjo.comm.jus.JusLog
 
TARGET_HOST - Static variable in class org.djodjo.comm.jus.http.HTTP
 
TimeoutError - Exception in org.djodjo.comm.jus.error
Indicates that the connection or the socket timed out.
TimeoutError() - Constructor for exception org.djodjo.comm.jus.error.TimeoutError
 
TokenRequest - Class in org.djodjo.comm.jus.request
 
toString() - Method in class org.djodjo.comm.jus.Request
 
TRACE - Static variable in interface org.djodjo.comm.jus.Request.Method
 
TRANSFER_ENCODING - Static variable in class org.djodjo.comm.jus.http.HTTP
HTTP header definitions
ttl - Variable in class org.djodjo.comm.jus.Cache.Entry
TTL for this record.

U

US_ASCII - Static variable in class org.djodjo.comm.jus.http.HTTP
 
USER_AGENT - Static variable in class org.djodjo.comm.jus.http.HTTP
 
UTF_16 - Static variable in class org.djodjo.comm.jus.http.HTTP
 
UTF_8 - Static variable in class org.djodjo.comm.jus.http.HTTP
Common charset definitions

V

v(String, Object...) - Static method in class org.djodjo.comm.jus.JusLog
 
valueOf(String) - Static method in enum org.djodjo.comm.jus.Request.Priority
Returns the enum constant of this type with the specified name.
values() - Static method in enum org.djodjo.comm.jus.Request.Priority
Returns an array containing the constants of this enum type, in the order they are declared.

W

withCacheDspather(CacheDispatcher) - Method in class org.djodjo.comm.jus.RequestQueue
 
write(byte[], int, int) - Method in class org.djodjo.comm.jus.toolbox.PoolingByteArrayOutputStream
 
write(int) - Method in class org.djodjo.comm.jus.toolbox.PoolingByteArrayOutputStream
 
wtf(String, Object...) - Static method in class org.djodjo.comm.jus.JusLog
 
wtf(Throwable, String, Object...) - Static method in class org.djodjo.comm.jus.JusLog
 
A B C D E F G H I J K L M N O P Q R S T U V W