Package org.jets3t.service.multi

Examples of org.jets3t.service.multi.StorageServiceEventAdaptor


            final int[] deleteObjectsEventCount = new int[] {0};

            // Multi-threaded service with adaptor to count event occurrences.
            ThreadedStorageService threadedService = new ThreadedStorageService(
                service,
                new StorageServiceEventAdaptor() {
                    @Override
                    public void event(CreateObjectsEvent event) {
                        if (CreateObjectsEvent.EVENT_IN_PROGRESS == event.getEventCode()) {
                            createObjectsEventCount[0] += event.getCreatedObjects().length;
                        }
View Full Code Here


        /*
         * Create a ThreadedStorageService object with an event listener that responds to
         * ListObjectsEvent notifications and populates a complete object listing.
         */
        final ThreadedStorageService threadedService = new ThreadedStorageService(service,
            new StorageServiceEventAdaptor() {
            @Override
            public void event(ListObjectsEvent event) {
                if (ListObjectsEvent.EVENT_IN_PROGRESS == event.getEventCode()) {
                    Iterator<StorageObjectsChunk> chunkIter = event.getChunkList().iterator();
                    while (chunkIter.hasNext()) {
View Full Code Here

            // Retrieve the complete metadata information for selected objects
            final List<StorageObject> objectsCompleteList =
                new ArrayList<StorageObject>(objectsWithoutMetadata.length);
            final ServiceException serviceExceptions[] = new ServiceException[1];
            ThreadedStorageService threadedService = new ThreadedStorageService(service,
                new StorageServiceEventAdaptor() {
                @Override
                public void event(GetObjectHeadsEvent event) {
                    if (GetObjectHeadsEvent.EVENT_IN_PROGRESS == event.getEventCode()) {
                        StorageObject[] finishedObjects = event.getCompletedObjects();
                        if (finishedObjects.length > 0) {
View Full Code Here

            eventListener = new S3ServiceEventAdaptor();
        }

        // Adaptor solely to capture newly-created MultipartUpload objects, which we
        // will need when it comes time to upload parts or complete the uploads.
        StorageServiceEventAdaptor captureMultipartUploadObjectsEventAdaptor =
            new S3ServiceEventAdaptor() {
                @Override
                public void event(MultipartStartsEvent event) {
                    if (ServiceEvent.EVENT_IN_PROGRESS == event.getEventCode()) {
                        for (MultipartUpload upload: event.getStartedUploads()) {
View Full Code Here

TOP

Related Classes of org.jets3t.service.multi.StorageServiceEventAdaptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.