com.amazonaws.event
Class ProgressListenerCallbackExecutor

java.lang.Object
  extended by com.amazonaws.event.ProgressListenerCallbackExecutor

public class ProgressListenerCallbackExecutor
extends java.lang.Object

This class wraps a ProgressListener object, and manages all its callback execution. Callbacks are executed sequentially in a separate single thread.


Constructor Summary
ProgressListenerCallbackExecutor()
           
ProgressListenerCallbackExecutor(ProgressListener listener)
           
 
Method Summary
 void progressChanged(ProgressEvent progressEvent)
           
static java.util.concurrent.Future<?> progressChanged(ProgressListener listener, ProgressEvent progressEvent)
          Used to submit a task to publish a progress event to the given listener.
static ProgressListenerCallbackExecutor wrapListener(ProgressListener listener)
          Returns a new ProgressListenerCallbackExecutor instance that wraps the specified ProgressListener if it is not null, otherwise directly returns null.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressListenerCallbackExecutor

public ProgressListenerCallbackExecutor(ProgressListener listener)

ProgressListenerCallbackExecutor

public ProgressListenerCallbackExecutor()
Method Detail

progressChanged

public static java.util.concurrent.Future<?> progressChanged(ProgressListener listener,
                                                             ProgressEvent progressEvent)
Used to submit a task to publish a progress event to the given listener.

Returns:
the future of the submitted task; or null if there is no listener.

progressChanged

public void progressChanged(ProgressEvent progressEvent)

wrapListener

public static ProgressListenerCallbackExecutor wrapListener(ProgressListener listener)
Returns a new ProgressListenerCallbackExecutor instance that wraps the specified ProgressListener if it is not null, otherwise directly returns null.



Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.