Package org.jgroups.protocols

Examples of org.jgroups.protocols.S3_PING$ListBucketResponse$ListBucketHandler


    request.setPrefix(listBucket.getPrefix());
    return request;
  }
 
  public static ListBucketResponse toListBucketResponse(S3ListBucketResponse engineResponse) {
    ListBucketResponse response = new ListBucketResponse();
    ListBucketResult result = new ListBucketResult();
    result.setName(engineResponse.getBucketName());
    result.setDelimiter(engineResponse.getDelimiter());
    result.setPrefix(engineResponse.getPrefix());
    result.setMarker(engineResponse.getMarker());
    result.setMaxKeys(engineResponse.getMaxKeys());
    result.setIsTruncated(engineResponse.isTruncated());
    result.setNextMarker(engineResponse.getNextMarker());
    result.setCommonPrefixes(toPrefixEntry(engineResponse.getCommonPrefixes()));
    result.setContents(toListEntry(engineResponse.getContents()));
    response.setListBucketResponse(result);
    return response;
  }
View Full Code Here


            S3ListBucketResponse engineResponse = ServiceProvider.getInstance()
                    .getS3Engine().listBucketContents(engineRequest, false);

            // To allow the all list buckets result to be serialized via Axiom
            // classes
            ListBucketResponse oneBucket = S3SerializableServiceImplementation
                    .toListBucketResponse(engineResponse);

            OutputStream outputStream = response.getOutputStream();
            response.setStatus(200);
            response.setContentType("application/xml");
View Full Code Here

        try {
            S3ListBucketResponse engineResponse = ServiceProvider.getInstance().getS3Engine().listBucketContents(engineRequest, false);

            // To allow the all list buckets result to be serialized via Axiom
            // classes
            ListBucketResponse oneBucket = S3SerializableServiceImplementation.toListBucketResponse(engineResponse);

            OutputStream outputStream = response.getOutputStream();
            response.setStatus(200);
            response.setContentType("application/xml");
            // The content-type literally should be
View Full Code Here

        request.setPrefix(listBucket.getPrefix());
        return request;
    }

    public static ListBucketResponse toListBucketResponse(S3ListBucketResponse engineResponse) {
        ListBucketResponse response = new ListBucketResponse();
        ListBucketResult result = new ListBucketResult();
        result.setName(engineResponse.getBucketName());
        result.setDelimiter(engineResponse.getDelimiter());
        result.setPrefix(engineResponse.getPrefix());
        result.setMarker(engineResponse.getMarker());
        result.setMaxKeys(engineResponse.getMaxKeys());
        result.setIsTruncated(engineResponse.isTruncated());
        result.setNextMarker(engineResponse.getNextMarker());
        result.setCommonPrefixes(toPrefixEntry(engineResponse.getCommonPrefixes()));
        result.setContents(toListEntry(engineResponse.getContents()));
        response.setListBucketResponse(result);
        return response;
    }
View Full Code Here

    request.setPrefix(listBucket.getPrefix());
    return request;
  }
 
  public static ListBucketResponse toListBucketResponse(S3ListBucketResponse engineResponse) {
    ListBucketResponse response = new ListBucketResponse();
    ListBucketResult result = new ListBucketResult();
    result.setName(engineResponse.getBucketName());
    result.setDelimiter(engineResponse.getDelimiter());
    result.setPrefix(engineResponse.getPrefix());
    result.setMarker(engineResponse.getMarker());
    result.setMaxKeys(engineResponse.getMaxKeys());
    result.setIsTruncated(engineResponse.isTruncated());
    result.setNextMarker(engineResponse.getNextMarker());
    result.setCommonPrefixes(toPrefixEntry(engineResponse.getCommonPrefixes()));
    result.setContents(toListEntry(engineResponse.getContents()));
    response.setListBucketResponse(result);
    return response;
  }
View Full Code Here

    int maxKeys = Converter.toInt(request.getParameter("max-keys"), 1000);
    engineRequest.setMaxKeys(maxKeys);
    S3ListBucketResponse engineResponse = ServiceProvider.getInstance().getS3Engine().listBucketContents( engineRequest, false );
   
    // -> serialize using the apache's Axiom classes
    ListBucketResponse oneBucket = S3SoapServiceImpl.toListBucketResponse( engineResponse );
 
    OutputStream os = response.getOutputStream();
    response.setStatus(200)
      response.setContentType("text/xml; charset=UTF-8");
    XMLStreamWriter xmlWriter = xmlOutFactory.createXMLStreamWriter( os );
    String documentStart = new String( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" );
    os.write( documentStart.getBytes());
    MTOMAwareXMLSerializer MTOMWriter = new MTOMAwareXMLSerializer( xmlWriter );
        oneBucket.serialize( new QName( "http://s3.amazonaws.com/doc/2006-03-01/", "ListBucketResponse", "ns1" ), factory, MTOMWriter );
        xmlWriter.flush();
        xmlWriter.close();
        os.close();
  }
View Full Code Here

      S3ListBucketResponse engineResponse = ServiceProvider.getInstance()
        .getS3Engine().listBucketContents(engineRequest, false);

      // To allow the all list buckets result to be serialized via Axiom
      // classes
      ListBucketResponse oneBucket = S3SerializableServiceImplementation
        .toListBucketResponse(engineResponse);

      OutputStream outputStream = response.getOutputStream();
      response.setStatus(200);
      response.setContentType("application/xml");
View Full Code Here

            S3ListBucketResponse engineResponse = ServiceProvider.getInstance()
                    .getS3Engine().listBucketContents(engineRequest, false);

            // To allow the all list buckets result to be serialized via Axiom
            // classes
            ListBucketResponse oneBucket = S3SerializableServiceImplementation
                    .toListBucketResponse(engineResponse);

            OutputStream outputStream = response.getOutputStream();
            response.setStatus(200);
            response.setContentType("application/xml");
View Full Code Here

TOP

Related Classes of org.jgroups.protocols.S3_PING$ListBucketResponse$ListBucketHandler

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.