/** * @return * the S3Objects that were not copied before the operation was cancelled. * @throws IllegalStateException * cancelled objects are only available from EVENT_CANCELLED events. */ public S3Object[] 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 S3Objects that were created by a a successful copy operation. * @throws IllegalStateException * copied objects are only available from EVENT_COMPLETED events. */ public S3Object[] getCopiedObjects() throws IllegalStateException { if (getEventCode() != EVENT_COMPLETED) { throw new IllegalStateException("Cancelled Objects are only available from EVENT_COMPLETED events"); } return destinationObjects; }
/** * @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 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 S3Objects that were not copied before the operation was cancelled. * @throws IllegalStateException * cancelled objects are only available from EVENT_CANCELLED events. */ public S3Object[] getCancelledObjects() throws IllegalStateException { if (getEventCode() != EVENT_CANCELLED) { throw new IllegalStateException("Cancelled Objects are only available from EVENT_CANCELLED events"); } return copyCancelledObjects; }
/** * @return * the S3Objects that were created by a a successful copy operation. * @throws IllegalStateException * copied objects are only available from EVENT_COMPLETED events. */ public S3Object[] getCopiedObjects() throws IllegalStateException { if (getEventCode() != EVENT_COMPLETED) { throw new IllegalStateException("Cancelled Objects are only available from EVENT_COMPLETED events"); } return destinationObjects; }
@Override public void s3ServiceEventPerformed(CopyObjectsEvent event) { super.s3ServiceEventPerformed(event); if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { resultsList.addAll(Arrays.asList(event.getCopyResults())); } }; };
@Override public void s3ServiceEventPerformed(CopyObjectsEvent event) { super.s3ServiceEventPerformed(event); if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { resultsList.addAll(Arrays.asList(event.getCopyResults())); } }; };
if (ServiceEvent.EVENT_STARTED == event.getEventCode()) { ThreadWatcher watcher = event.getThreadWatcher(); startProgressDialog("Copied 0 of " + watcher.getThreadCount() + " objects", "Cancel Copy", event.getThreadWatcher().getCancelEventListener()); else if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { ThreadWatcher watcher = event.getThreadWatcher(); String statusText = "Copied " + watcher.getCompletedThreads() updateProgressDialog(statusText, "", (int) watcher.getCompletedThreads()); else if (ServiceEvent.EVENT_COMPLETED == event.getEventCode() || ServiceEvent.EVENT_CANCELLED == event.getEventCode()) else if (ServiceEvent.EVENT_ERROR == event.getEventCode()) { stopProgressDialog();
if (ServiceEvent.EVENT_STARTED == event.getEventCode()) { ThreadWatcher watcher = event.getThreadWatcher(); startProgressDialog("Copied 0 of " + watcher.getThreadCount() + " objects", "Cancel Copy", event.getThreadWatcher().getCancelEventListener()); else if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { ThreadWatcher watcher = event.getThreadWatcher(); String statusText = "Copied " + watcher.getCompletedThreads() updateProgressDialog(statusText, "", (int) watcher.getCompletedThreads()); else if (ServiceEvent.EVENT_COMPLETED == event.getEventCode() || ServiceEvent.EVENT_CANCELLED == event.getEventCode()) else if (ServiceEvent.EVENT_ERROR == event.getEventCode()) { stopProgressDialog();