public class StorageServiceEventAdaptor extends java.lang.Object implements StorageServiceEventListener
StorageServiceEventListener
to listen for events produced by
ThreadedStorageService
.
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 event 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 and Description |
---|
StorageServiceEventAdaptor() |
Modifier and Type | Method and Description |
---|---|
void |
event(CopyObjectsEvent event) |
void |
event(CreateBucketsEvent event) |
void |
event(CreateObjectsEvent event) |
void |
event(DeleteObjectsEvent event) |
void |
event(DownloadObjectsEvent event) |
void |
event(GetObjectHeadsEvent event) |
void |
event(GetObjectsEvent event) |
void |
event(ListObjectsEvent event) |
void |
event(LookupACLEvent event) |
void |
event(UpdateACLEvent event) |
java.lang.Throwable |
getErrorThrown() |
protected void |
storeThrowable(ServiceEvent event) |
void |
throwErrorIfPresent() |
boolean |
wasErrorThrown() |
public void event(ListObjectsEvent event)
event
in interface StorageServiceEventListener
public void event(CreateObjectsEvent event)
event
in interface StorageServiceEventListener
public void event(CopyObjectsEvent event)
event
in interface StorageServiceEventListener
public void event(CreateBucketsEvent event)
event
in interface StorageServiceEventListener
public void event(DeleteObjectsEvent event)
event
in interface StorageServiceEventListener
public void event(GetObjectsEvent event)
event
in interface StorageServiceEventListener
public void event(GetObjectHeadsEvent event)
event
in interface StorageServiceEventListener
public void event(LookupACLEvent event)
event
in interface StorageServiceEventListener
public void event(UpdateACLEvent event)
event
in interface StorageServiceEventListener
public void event(DownloadObjectsEvent event)
event
in interface StorageServiceEventListener
protected void storeThrowable(ServiceEvent event)
public boolean wasErrorThrown()
public java.lang.Throwable getErrorThrown()
public void throwErrorIfPresent() throws java.lang.Exception
java.lang.Exception
- throws first error thrown by an event, or does nothing if no error occurred.