/** * @return * the {@link StorageObject}s that were created by a a successful copy operation. * @throws IllegalStateException * copied objects are only available from EVENT_COMPLETED events. */ public StorageObject[] getCopiedObjects() throws IllegalStateException { if (getEventCode() != EVENT_COMPLETED) { throw new IllegalStateException("Cancelled Objects are only available from EVENT_COMPLETED events"); } return destinationObjects; }
/** * @return * the {@link StorageObject}s that were not copied before the operation was cancelled. * @throws IllegalStateException * cancelled objects are only available from EVENT_CANCELLED events. */ public StorageObject[] getCancelledObjects() throws IllegalStateException { if (getEventCode() != EVENT_CANCELLED) { throw new IllegalStateException("Cancelled Objects are only available from EVENT_CANCELLED events"); } return copyCancelledObjects; }
/** * @return * the {@link StorageObject}s that were created by a a successful copy operation. * @throws IllegalStateException * copied objects are only available from EVENT_COMPLETED events. */ public StorageObject[] getCopiedObjects() throws IllegalStateException { if (getEventCode() != EVENT_COMPLETED) { throw new IllegalStateException("Cancelled Objects are only available from EVENT_COMPLETED events"); } return destinationObjects; }
/** * @return * the key names of source objects that were copied in a successful operation. * @throws IllegalStateException * source object key names are only available from EVENT_COMPLETED events. */ public String[] getSourceObjectKeys() throws IllegalStateException { if (getEventCode() != EVENT_COMPLETED) { throw new IllegalStateException("Source Objects are only available from EVENT_COMPLETED events"); } return sourceObjectKeys; }
/** * @return * the {@link StorageObject}s that were not copied before the operation was cancelled. * @throws IllegalStateException * cancelled objects are only available from EVENT_CANCELLED events. */ public StorageObject[] getCancelledObjects() throws IllegalStateException { if (getEventCode() != EVENT_CANCELLED) { throw new IllegalStateException("Cancelled Objects are only available from EVENT_CANCELLED events"); } return copyCancelledObjects; }
/** * @return * the key names of source objects that were copied in a successful operation. * @throws IllegalStateException * source object key names are only available from EVENT_COMPLETED events. */ public String[] getSourceObjectKeys() throws IllegalStateException { if (getEventCode() != EVENT_COMPLETED) { throw new IllegalStateException("Source Objects are only available from EVENT_COMPLETED events"); } return sourceObjectKeys; }
/** * @return * the Map results for the objects that have been copied since the last progress event was fired. * @throws IllegalStateException * results are only available from EVENT_IN_PROGRESS events. */ public Map[] getCopyResults() throws IllegalStateException { if (getEventCode() != EVENT_IN_PROGRESS) { throw new IllegalStateException( "Copy results are only available from EVENT_IN_PROGRESS events"); } return results; }
/** * @return * the Map results for the objects that have been copied since the last progress event was fired. * @throws IllegalStateException * results are only available from EVENT_IN_PROGRESS events. */ public Map[] getCopyResults() throws IllegalStateException { if (getEventCode() != EVENT_IN_PROGRESS) { throw new IllegalStateException( "Copy results are only available from EVENT_IN_PROGRESS events"); } return results; }
@Override public void event(CopyObjectsEvent event) { super.event(event); if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { resultsList.addAll(Arrays.asList(event.getCopyResults())); } }; };
@Override public void event(CopyObjectsEvent event) { super.event(event); if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { resultsList.addAll(Arrays.asList(event.getCopyResults())); } }; };