/** * @return * the {@link StorageBucket}s that have been created since the last progress event was fired. * @throws IllegalStateException * created buckets are only available from EVENT_IN_PROGRESS events. */ public StorageBucket[] getCreatedBuckets() throws IllegalStateException { if (getEventCode() != EVENT_IN_PROGRESS) { throw new IllegalStateException("Created Buckets are only available from EVENT_IN_PROGRESS events"); } return buckets; }
/** * @return * the {@link StorageBucket}s that had not been created before the operation was cancelled. * @throws IllegalStateException * cancelled buckets are only available from EVENT_CANCELLED events. */ public StorageBucket[] getCancelledBuckets() throws IllegalStateException { if (getEventCode() != EVENT_CANCELLED) { throw new IllegalStateException("Cancelled Buckets are only available from EVENT_CANCELLED events"); } return buckets; }
/** * @return * the {@link StorageBucket}s that have been created since the last progress event was fired. * @throws IllegalStateException * created buckets are only available from EVENT_IN_PROGRESS events. */ public StorageBucket[] getCreatedBuckets() throws IllegalStateException { if (getEventCode() != EVENT_IN_PROGRESS) { throw new IllegalStateException("Created Buckets are only available from EVENT_IN_PROGRESS events"); } return buckets; }
/** * @return * the {@link StorageBucket}s that had not been created before the operation was cancelled. * @throws IllegalStateException * cancelled buckets are only available from EVENT_CANCELLED events. */ public StorageBucket[] getCancelledBuckets() throws IllegalStateException { if (getEventCode() != EVENT_CANCELLED) { throw new IllegalStateException("Cancelled Buckets are only available from EVENT_CANCELLED events"); } return buckets; }
@Override public void event(CreateBucketsEvent event) { super.event(event); if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { bucketList.addAll(Arrays.asList(event.getCreatedBuckets())); } }; };
@Override public void event(CreateBucketsEvent event) { super.event(event); if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { bucketList.addAll(Arrays.asList(event.getCreatedBuckets())); } }; };