org.jets3t.service.multithread
Class S3ServiceEventAdaptor

java.lang.Object
  extended by org.jets3t.service.multithread.S3ServiceEventAdaptor
All Implemented Interfaces:
S3ServiceEventListener

public class S3ServiceEventAdaptor
extends java.lang.Object
implements S3ServiceEventListener

Simple implementation of S3ServiceEventListener to listen for events produced by S3ServiceMulti.

By default this adaptor does nothing but store the first Error event it comes across, if any, and make it available through getErrorThrown().

The behaviour of this class can be specialised by over-riding the appropriate s3ServiceEventPerformed methods, though always be sure to call the super version of these methods if you are relying on the default error-trapping functions of this class.


Constructor Summary
S3ServiceEventAdaptor()
           
 
Method Summary
 java.lang.Throwable getErrorThrown()
           
 void s3ServiceEventPerformed(CopyObjectsEvent event)
           
 void s3ServiceEventPerformed(CreateBucketsEvent event)
           
 void s3ServiceEventPerformed(CreateObjectsEvent event)
           
 void s3ServiceEventPerformed(DeleteObjectsEvent event)
           
 void s3ServiceEventPerformed(DeleteVersionedObjectsEvent event)
           
 void s3ServiceEventPerformed(DownloadObjectsEvent event)
           
 void s3ServiceEventPerformed(GetObjectHeadsEvent event)
           
 void s3ServiceEventPerformed(GetObjectsEvent event)
           
 void s3ServiceEventPerformed(ListObjectsEvent event)
           
 void s3ServiceEventPerformed(LookupACLEvent event)
           
 void s3ServiceEventPerformed(UpdateACLEvent event)
           
protected  void storeThrowable(ServiceEvent event)
           
 boolean wasErrorThrown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

S3ServiceEventAdaptor

public S3ServiceEventAdaptor()
Method Detail

s3ServiceEventPerformed

public void s3ServiceEventPerformed(ListObjectsEvent event)
Specified by:
s3ServiceEventPerformed in interface S3ServiceEventListener

s3ServiceEventPerformed

public void s3ServiceEventPerformed(CreateObjectsEvent event)
Specified by:
s3ServiceEventPerformed in interface S3ServiceEventListener

s3ServiceEventPerformed

public void s3ServiceEventPerformed(CopyObjectsEvent event)
Specified by:
s3ServiceEventPerformed in interface S3ServiceEventListener

s3ServiceEventPerformed

public void s3ServiceEventPerformed(CreateBucketsEvent event)
Specified by:
s3ServiceEventPerformed in interface S3ServiceEventListener

s3ServiceEventPerformed

public void s3ServiceEventPerformed(DeleteObjectsEvent event)
Specified by:
s3ServiceEventPerformed in interface S3ServiceEventListener

s3ServiceEventPerformed

public void s3ServiceEventPerformed(DeleteVersionedObjectsEvent event)
Specified by:
s3ServiceEventPerformed in interface S3ServiceEventListener

s3ServiceEventPerformed

public void s3ServiceEventPerformed(GetObjectsEvent event)
Specified by:
s3ServiceEventPerformed in interface S3ServiceEventListener

s3ServiceEventPerformed

public void s3ServiceEventPerformed(GetObjectHeadsEvent event)
Specified by:
s3ServiceEventPerformed in interface S3ServiceEventListener

s3ServiceEventPerformed

public void s3ServiceEventPerformed(LookupACLEvent event)
Specified by:
s3ServiceEventPerformed in interface S3ServiceEventListener

s3ServiceEventPerformed

public void s3ServiceEventPerformed(UpdateACLEvent event)
Specified by:
s3ServiceEventPerformed in interface S3ServiceEventListener

s3ServiceEventPerformed

public void s3ServiceEventPerformed(DownloadObjectsEvent event)
Specified by:
s3ServiceEventPerformed in interface S3ServiceEventListener

storeThrowable

protected void storeThrowable(ServiceEvent event)

wasErrorThrown

public boolean wasErrorThrown()
Returns:
true if an event has resulted in an exception.

getErrorThrown

public java.lang.Throwable getErrorThrown()
Returns:
the first error thrown by an event, or null if no error has been thrown.