Examples of DistributionConfigHandler


Examples of org.jets3t.service.impl.rest.CloudFrontXmlResponsesSaxParser.DistributionConfigHandler

        GetMethod httpMethod = new GetMethod(ENDPOINT + VERSION + "/distribution/" + id + "/config");
       
        try {
            performRestRequest(httpMethod, 200);

            DistributionConfigHandler handler = (new CloudFrontXmlResponsesSaxParser())
                .parseDistributionConfigResponse(httpMethod.getResponseBodyAsStream());
           
            DistributionConfig config = handler.getDistributionConfig();
            config.setEtag(httpMethod.getResponseHeader("ETag").getValue());           
            return config;
        } catch (CloudFrontServiceException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here

Examples of org.jets3t.service.impl.rest.CloudFrontXmlResponsesSaxParser.DistributionConfigHandler

                new StringRequestEntity(builder.asString(null), "text/xml", Constants.DEFAULT_ENCODING));
            httpMethod.setRequestHeader("If-Match", oldConfig.getEtag());

            performRestRequest(httpMethod, 200);

            DistributionConfigHandler handler = (new CloudFrontXmlResponsesSaxParser())
                .parseDistributionConfigResponse(httpMethod.getResponseBodyAsStream());

            DistributionConfig config = handler.getDistributionConfig();
            config.setEtag(httpMethod.getResponseHeader("ETag").getValue());           
            return config;
        } catch (CloudFrontServiceException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here

Examples of org.jets3t.service.impl.rest.CloudFrontXmlResponsesSaxParser.DistributionConfigHandler

                + (isStreaming ? "/streaming-distribution/" : "/distribution/")
                + distributionId + "/config");

        try {
            HttpResponse response = performRestRequest(httpMethod, 200);
            DistributionConfigHandler handler =
                    (new CloudFrontXmlResponsesSaxParser(this.jets3tProperties))
                            .parseDistributionConfigResponse(response.getEntity().getContent());

            DistributionConfig config = handler.getDistributionConfig();
            config.setEtag(response.getFirstHeader("ETag").getValue());
            return config;
        }
        catch(CloudFrontServiceException e) {
            throw e;
View Full Code Here

Examples of org.jets3t.service.impl.rest.CloudFrontXmlResponsesSaxParser.DistributionConfigHandler

                    distributionConfigXml,
                    ContentType.create("text/xml", Constants.DEFAULT_ENCODING)));
            httpMethod.setHeader("If-Match", etag);
            HttpResponse response = performRestRequest(httpMethod, 200);

            DistributionConfigHandler handler =
                    (new CloudFrontXmlResponsesSaxParser(this.jets3tProperties))
                            .parseDistributionConfigResponse(response.getEntity().getContent());

            DistributionConfig resultConfig = handler.getDistributionConfig();
            resultConfig.setEtag(response.getFirstHeader("ETag").getValue());
            return resultConfig;
        }
        catch(CloudFrontServiceException e) {
            throw e;
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.