Class S3ProxyHandler
java.lang.Object
ecmwf.ecpds.mover.plugin.http.S3ProxyHandler
HTTP server-independent handler for S3 requests.
- Author:
- root
-
Constructor Summary
ConstructorsConstructorDescriptionS3ProxyHandler
(AuthenticationType authenticationType, long v4MaxNonChunkedRequestSize, boolean ignoreUnknownHeaders, CrossOriginResourceSharing corsRules, String servicePath, int maximumTimeSkew) Instantiates a new s 3 proxy handler. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
doHandle
(javax.servlet.http.HttpServletRequest baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, InputStream is) Do handle.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) Send simple error response.
-
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 typev4MaxNonChunkedRequestSize
- the v 4 max non chunked request sizeignoreUnknownHeaders
- the ignore unknown headerscorsRules
- the cors rulesservicePath
- the service pathmaximumTimeSkew
- 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 requestrequest
- the requestresponse
- the responseis
- 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 IOExceptionSend simple error response.- Parameters:
request
- the requestresponse
- the responsecode
- the codemessage
- the messageelements
- the elements- Throws:
IOException
- Signals that an I/O exception has occurred.
-