Examples of StringPayload


Examples of org.jclouds.io.payloads.StringPayload

        String message2 = "Blob in other directory";

        MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results-in-dir", MockEndpoint.class);
        mockEndpoint.expectedBodiesReceived(message1);

        JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER_WITH_DIR, TEST_BLOB_IN_DIR, new StringPayload(message1));
        JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER_WITH_DIR, TEST_BLOB_IN_OTHER, new StringPayload(message2));

        mockEndpoint.assertIsSatisfied();
    }
View Full Code Here

Examples of org.jclouds.io.payloads.StringPayload

        return new ByteArrayPayload(bytes);
    }

    @Converter
    public static Payload toPayload(String str) {
        return new StringPayload(str);
    }
View Full Code Here

Examples of org.jclouds.io.payloads.StringPayload

    public void testRanges() throws IOException {
        blobStore.createContainerInLocation(null, CONTAINER_NAME);
        String input = "abcdefgh";
        Payload payload;
        Blob blob = blobStore.blobBuilder("test").payload(new StringPayload(input)).build();
        blobStore.putBlob(CONTAINER_NAME, blob);

        GetOptions getOptionsRangeStartAt = new GetOptions();
        getOptionsRangeStartAt.startAt(1);
        Blob blobRangeStartAt = blobStore.getBlob(CONTAINER_NAME, blob.getMetadata().getName(), getOptionsRangeStartAt);
View Full Code Here

Examples of org.jclouds.io.payloads.StringPayload

        mockEndpoint1.expectedBodiesReceived(message1);

        MockEndpoint mockEndpoint2 = resolveMandatoryEndpoint("mock:results2", MockEndpoint.class);
        mockEndpoint2.expectedBodiesReceived(message2);

        JcloudsBlobStoreHelper.writeBlob(blobStore1, TEST_CONTAINER, TEST_BLOB1, new StringPayload(message1));
        JcloudsBlobStoreHelper.writeBlob(blobStore2, TEST_CONTAINER, TEST_BLOB2, new StringPayload(message2));

        mockEndpoint1.assertIsSatisfied();
        mockEndpoint2.assertIsSatisfied();
    }
View Full Code Here

Examples of org.jclouds.io.payloads.StringPayload

        String message = "Some message";

        MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results", MockEndpoint.class);
        mockEndpoint.expectedBodiesReceived(message);

        JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER, TEST_BLOB1, new StringPayload(message));

        mockEndpoint.assertIsSatisfied();
    }
View Full Code Here

Examples of org.jclouds.io.payloads.StringPayload

        String message2 = "Blob 2";

        MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results", MockEndpoint.class);
        mockEndpoint.expectedBodiesReceived(message1, message2);

        JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER, TEST_BLOB1, new StringPayload(message1));
        JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER, TEST_BLOB2, new StringPayload(message2));

        mockEndpoint.assertIsSatisfied();
    }
View Full Code Here

Examples of org.jclouds.io.payloads.StringPayload

        String message1 = "Blob in directory";

        MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results-in-dir", MockEndpoint.class);
        mockEndpoint.expectedBodiesReceived(message1);

        JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER_WITH_DIR, TEST_BLOB_IN_DIR, new StringPayload(message1));

        mockEndpoint.assertIsSatisfied();
    }
View Full Code Here

Examples of org.jclouds.io.payloads.StringPayload

        String message2 = "Blob in other directory";

        MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results-in-dir", MockEndpoint.class);
        mockEndpoint.expectedBodiesReceived(message1);

        JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER_WITH_DIR, TEST_BLOB_IN_DIR, new StringPayload(message1));
        JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER_WITH_DIR, TEST_BLOB_IN_OTHER, new StringPayload(message2));

        mockEndpoint.assertIsSatisfied();
    }
View Full Code Here

Examples of org.jclouds.io.payloads.StringPayload

        return new ByteArrayPayload(bytes);
    }

    @Converter
    public static Payload toPayload(String str) {
        return new StringPayload(str);
    }
View Full Code Here

Examples of org.jclouds.io.payloads.StringPayload

      return key.toString();
    }

    @Override
    public void put(String path, String text) {
      put(path, new StringPayload(text));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.