/** * @return * the {@link StorageObject}s that were not downloaded 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 objects; }
/** * @return * the {@link StorageObject}s that have finished downloading since the last progress event was fired. * @throws IllegalStateException * downloaded objects are only available from EVENT_IN_PROGRESS events. */ public StorageObject[] getDownloadedObjects() throws IllegalStateException { if (getEventCode() != EVENT_IN_PROGRESS) { throw new IllegalStateException("Downloaded Objects are only available from EVENT_IN_PROGRESS events"); } return objects; }
/** * @return * the {@link StorageObject}s that have finished downloading since the last progress event was fired. * @throws IllegalStateException * downloaded objects are only available from EVENT_IN_PROGRESS events. */ public StorageObject[] getDownloadedObjects() throws IllegalStateException { if (getEventCode() != EVENT_IN_PROGRESS) { throw new IllegalStateException("Downloaded Objects are only available from EVENT_IN_PROGRESS events"); } return objects; }
/** * @return * the {@link StorageObject}s that were not downloaded 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 objects; }
@Override public void event(DownloadObjectsEvent event) { super.event(event); if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { objectList.addAll(Arrays.asList(event.getDownloadedObjects())); } }; };
@Override public void event(DownloadObjectsEvent event) { super.event(event); if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { objectList.addAll(Arrays.asList(event.getDownloadedObjects())); } }; };
@Override public void event(DownloadObjectsEvent event) { super.event(event); displayIgnoredErrors(event); if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { displayProgressStatus("Download: ", event.getThreadWatcher()); } }
@Override public void event(DownloadObjectsEvent event) { super.event(event); displayIgnoredErrors(event); if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { displayProgressStatus("Download: ", event.getThreadWatcher()); } }