Class S3ProxyHandler

java.lang.Object
ecmwf.ecpds.mover.plugin.http.S3ProxyHandler

public class S3ProxyHandler extends Object
HTTP server-independent handler for S3 requests.
Author:
root
  • Constructor Details

    • S3ProxyHandler

      public S3ProxyHandler(AuthenticationType authenticationType, long v4MaxNonChunkedRequestSize, boolean ignoreUnknownHeaders, CrossOriginResourceSharing corsRules, String servicePath, int maximumTimeSkew)
      Instantiates a new s 3 proxy handler.
      Parameters:
      authenticationType - the authentication type
      v4MaxNonChunkedRequestSize - the v 4 max non chunked request size
      ignoreUnknownHeaders - the ignore unknown headers
      corsRules - the cors rules
      servicePath - the service path
      maximumTimeSkew - the maximum time skew
  • Method Details

    • doHandle

      public final void doHandle(javax.servlet.http.HttpServletRequest baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, InputStream is) throws IOException, S3Exception
      Do handle.
      Parameters:
      baseRequest - the base request
      request - the request
      response - the response
      is - the is
      Throws:
      IOException - Signals that an I/O exception has occurred.
      S3Exception - the s 3 exception
    • sendSimpleErrorResponse

      protected final void sendSimpleErrorResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ecmwf.ecpds.mover.plugin.http.S3ErrorCode code, String message, Map<String,String> elements) throws IOException
      Send simple error response.
      Parameters:
      request - the request
      response - the response
      code - the code
      message - the message
      elements - the elements
      Throws:
      IOException - Signals that an I/O exception has occurred.