Class SdkException.BuilderImpl
- java.lang.Object
-
- software.amazon.awssdk.core.exception.SdkException.BuilderImpl
-
- All Implemented Interfaces:
SdkException.Builder,Buildable
- Direct Known Subclasses:
SdkClientException.BuilderImpl,SdkServiceException.BuilderImpl
- Enclosing class:
- SdkException
protected static class SdkException.BuilderImpl extends Object implements SdkException.Builder
-
-
Field Summary
Fields Modifier and Type Field Description protected Throwablecauseprotected Stringmessageprotected IntegernumAttemptsprotected BooleanwritableStackTrace
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilderImpl()protectedBuilderImpl(SdkException ex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SdkExceptionbuild()Creates a newSdkExceptionwith the specified properties.Throwablecause()The exception that caused this exception to occur.SdkException.Buildercause(Throwable cause)Specifies the exception that caused this exception to occur.ThrowablegetCause()StringgetMessage()IntegergetNumAttempts()BooleangetWritableStackTrace()Stringmessage()The details of this exception.SdkException.Buildermessage(String message)Specifies the details of this exception.IntegernumAttempts()The number of times a request was attempted before this exception was thrownSdkException.BuildernumAttempts(Integer numAttempts)voidsetAttemptCount(Integer attemptCount)voidsetCause(Throwable cause)voidsetMessage(String message)voidsetWritableStackTrace(Boolean writableStackTrace)BooleanwritableStackTrace()Whether the stack trace in this exception can be written.SdkException.BuilderwritableStackTrace(Boolean writableStackTrace)Specifies whether the stack trace in this exception can be written.
-
-
-
Constructor Detail
-
BuilderImpl
protected BuilderImpl()
-
BuilderImpl
protected BuilderImpl(SdkException ex)
-
-
Method Detail
-
getCause
public Throwable getCause()
-
setCause
public void setCause(Throwable cause)
-
cause
public SdkException.Builder cause(Throwable cause)
Description copied from interface:SdkException.BuilderSpecifies the exception that caused this exception to occur.- Specified by:
causein interfaceSdkException.Builder- Parameters:
cause- The exception that caused this exception to occur.- Returns:
- This object for method chaining.
-
cause
public Throwable cause()
Description copied from interface:SdkException.BuilderThe exception that caused this exception to occur.- Specified by:
causein interfaceSdkException.Builder- Returns:
- The exception that caused this exception to occur.
-
getMessage
public String getMessage()
-
message
public SdkException.Builder message(String message)
Description copied from interface:SdkException.BuilderSpecifies the details of this exception.- Specified by:
messagein interfaceSdkException.Builder- Parameters:
message- The details of this exception.- Returns:
- This method for object chaining
-
setMessage
public void setMessage(String message)
-
message
public String message()
Description copied from interface:SdkException.BuilderThe details of this exception.- Specified by:
messagein interfaceSdkException.Builder- Returns:
- Details of this exception.
-
getNumAttempts
public Integer getNumAttempts()
-
setAttemptCount
public void setAttemptCount(Integer attemptCount)
-
numAttempts
public SdkException.Builder numAttempts(Integer numAttempts)
- Specified by:
numAttemptsin interfaceSdkException.Builder- Parameters:
numAttempts- The attempt count- Returns:
- This method for object chaining
-
numAttempts
public Integer numAttempts()
Description copied from interface:SdkException.BuilderThe number of times a request was attempted before this exception was thrown- Specified by:
numAttemptsin interfaceSdkException.Builder- Returns:
- the attempt count
-
writableStackTrace
public SdkException.Builder writableStackTrace(Boolean writableStackTrace)
Description copied from interface:SdkException.BuilderSpecifies whether the stack trace in this exception can be written.- Specified by:
writableStackTracein interfaceSdkException.Builder- Parameters:
writableStackTrace- Whether the stack trace can be written.- Returns:
- This method for object chaining
-
setWritableStackTrace
public void setWritableStackTrace(Boolean writableStackTrace)
-
writableStackTrace
public Boolean writableStackTrace()
Description copied from interface:SdkException.BuilderWhether the stack trace in this exception can be written.- Specified by:
writableStackTracein interfaceSdkException.Builder
-
getWritableStackTrace
public Boolean getWritableStackTrace()
-
build
public SdkException build()
Description copied from interface:SdkException.BuilderCreates a newSdkExceptionwith the specified properties.- Specified by:
buildin interfaceBuildable- Specified by:
buildin interfaceSdkException.Builder- Returns:
- The new
SdkException.
-
-