Package alluxio.proxy.s3
Class S3Error
- java.lang.Object
-
- alluxio.proxy.s3.S3Error
-
public class S3Error extends java.lang.ObjectError response defined in http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html. It will be encoded into an XML string to be returned as an error response for the REST call.
-
-
Constructor Summary
Constructors Constructor Description S3Error()Creates anS3Error.S3Error(java.lang.String resource, S3ErrorCode code)Creates a newError.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCode()java.lang.StringgetMessage()java.lang.StringgetRequestId()java.lang.StringgetResource()voidsetCode(java.lang.String code)voidsetMessage(java.lang.String message)voidsetRequestId(java.lang.String requestId)voidsetResource(java.lang.String resource)
-
-
-
Constructor Detail
-
S3Error
public S3Error()
Creates anS3Error. This is needed forS3Errorto be encoded into XML, see https://stackoverflow.com/ questions/26014184/jersey-returns-500-when-trying-to-return-an-xml-response for details.
-
S3Error
public S3Error(java.lang.String resource, S3ErrorCode code)Creates a newError.- Parameters:
resource- the resource (bucket or object key) where the error happenscode- the error code
-
-
Method Detail
-
getCode
public java.lang.String getCode()
- Returns:
- the error code
-
getMessage
public java.lang.String getMessage()
- Returns:
- the error message
-
getRequestId
public java.lang.String getRequestId()
- Returns:
- the request ID
-
getResource
public java.lang.String getResource()
- Returns:
- the resource name
-
setCode
public void setCode(java.lang.String code)
- Parameters:
code- the error code to set
-
setMessage
public void setMessage(java.lang.String message)
- Parameters:
message- the error message to set
-
setRequestId
public void setRequestId(java.lang.String requestId)
- Parameters:
requestId- the request ID to set
-
setResource
public void setResource(java.lang.String resource)
- Parameters:
resource- the resource name to set
-
-