public class SDKProgressPublisher extends Object
Modifier and Type | Field and Description |
---|---|
protected static boolean |
ASYNC |
protected static boolean |
SYNC |
Constructor and Description |
---|
SDKProgressPublisher() |
Modifier and Type | Method and Description |
---|---|
protected static ExecutorService |
getExecutorService()
Returns the executor service used for performing the callbacks.
|
static Future<?> |
publishProgress(ProgressListener listener,
ProgressEventType type)
Used to deliver a progress event to the given listener.
|
static Future<?> |
publishRequestBytesTransferred(ProgressListener listener,
long bytes)
Convenient method to publish a request byte transfer event to the given
listener.
|
static Future<?> |
publishRequestContentLength(ProgressListener listener,
long bytes)
Convenient method to publish a request content length event to the given
listener.
|
static Future<?> |
publishRequestReset(ProgressListener listener,
long bytesReset)
Convenient method to publish a request reset event to the given listener.
|
static Future<?> |
publishResponseBytesDiscarded(ProgressListener listener,
long bytesDiscarded)
Convenient method to publish a response bytes discard event to the given listener.
|
static Future<?> |
publishResponseBytesTransferred(ProgressListener listener,
long bytes)
Convenient method to publish a response byte transfer event to the given
listener.
|
static Future<?> |
publishResponseContentLength(ProgressListener listener,
long bytes)
Convenient method to publish a response content length event to the given
listener.
|
static Future<?> |
publishResponseReset(ProgressListener listener,
long bytesReset)
Convenient method to publish a response reset event to the given listener.
|
protected static Future<?> |
setLatestFutureTask(Future<?> f) |
static void |
waitTillCompletion()
Deprecated.
|
protected static final boolean SYNC
protected static final boolean ASYNC
public static Future<?> publishProgress(ProgressListener listener, ProgressEventType type)
public static Future<?> publishRequestContentLength(ProgressListener listener, long bytes)
listener
- must not be null or else the publication will be skippedbytes
- must be non-negative or else the publication will be skippedpublic static Future<?> publishResponseContentLength(ProgressListener listener, long bytes)
listener
- must not be null or else the publication will be skippedbytes
- must be non-negative or else the publication will be skippedpublic static Future<?> publishRequestBytesTransferred(ProgressListener listener, long bytes)
listener
- must not be null or else the publication will be skippedbytes
- must be non-negative or else the publication will be skippedpublic static Future<?> publishResponseBytesTransferred(ProgressListener listener, long bytes)
listener
- must not be null or else the publication will be skippedbytes
- must be non-negative or else the publication will be skippedpublic static Future<?> publishRequestReset(ProgressListener listener, long bytesReset)
listener
- must not be null or else the publication will be skippedbytesReset
- must be non-negative or else the publication will be skippedpublic static Future<?> publishResponseReset(ProgressListener listener, long bytesReset)
public static Future<?> publishResponseBytesDiscarded(ProgressListener listener, long bytesDiscarded)
protected static ExecutorService getExecutorService()
@Deprecated public static void waitTillCompletion() throws InterruptedException, ExecutionException
Copyright © 2014. All rights reserved.