/** * @return * the {@link StorageObject}s whose ACLs have been retrieved since the last progress event was fired. * @throws IllegalStateException * objects with ACL are only available from EVENT_IN_PROGRESS events. */ public StorageObject[] getObjectsWithACL() throws IllegalStateException { if (getEventCode() != EVENT_IN_PROGRESS) { throw new IllegalStateException("Completed Objects are only available from EVENT_IN_PROGRESS events"); } return objects; }
/** * @return * the {@link StorageObject}s whose ACLs were not retrieved 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 whose ACLs have been retrieved since the last progress event was fired. * @throws IllegalStateException * objects with ACL are only available from EVENT_IN_PROGRESS events. */ public StorageObject[] getObjectsWithACL() throws IllegalStateException { if (getEventCode() != EVENT_IN_PROGRESS) { throw new IllegalStateException("Completed Objects are only available from EVENT_IN_PROGRESS events"); } return objects; }
/** * @return * the {@link StorageObject}s whose ACLs were not retrieved 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(LookupACLEvent event) { super.event(event); if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { objectList.addAll(Arrays.asList(event.getObjectsWithACL())); } }; };
@Override public void event(LookupACLEvent event) { super.event(event); if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) { objectList.addAll(Arrays.asList(event.getObjectsWithACL())); } }; };