Package org.jets3t.service.impl.rest.CloudFrontXmlResponsesSaxParser

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


            httpMethod.setRequestEntity(
                new StringRequestEntity(builder.asString(null), "text/xml", Constants.DEFAULT_ENCODING));

            performRestRequest(httpMethod, 201);

            DistributionHandler handler = (new CloudFrontXmlResponsesSaxParser())
                .parseDistributionResponse(httpMethod.getResponseBodyAsStream());
           
            return handler.getDistribution();
        } catch (CloudFrontServiceException e) {
            throw e;
        } catch (Exception e) {
            throw new CloudFrontServiceException(e);
        }               
View Full Code Here


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

            DistributionHandler handler = (new CloudFrontXmlResponsesSaxParser())
                .parseDistributionResponse(httpMethod.getResponseBodyAsStream());
           
            return handler.getDistribution();
        } catch (CloudFrontServiceException e) {
            throw e;
        } catch (Exception e) {
            throw new CloudFrontServiceException(e);
        }                       
View Full Code Here

                    distributionConfigXml,
                    ContentType.create("text/xml", Constants.DEFAULT_ENCODING)));

            HttpResponse response = performRestRequest(httpMethod, 201);

            DistributionHandler handler =
                    (new CloudFrontXmlResponsesSaxParser(this.jets3tProperties))
                            .parseDistributionResponse(response.getEntity().getContent());

            return handler.getDistribution();
        }
        catch(CloudFrontServiceException e) {
            throw e;
        }
        catch(RuntimeException e) {
View Full Code Here

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

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

            return handler.getDistribution();
        }
        catch(CloudFrontServiceException e) {
            throw e;
        }
        catch(RuntimeException e) {
View Full Code Here

TOP

Related Classes of org.jets3t.service.impl.rest.CloudFrontXmlResponsesSaxParser.DistributionHandler

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.