Package org.bremersee.exception
Interface ServiceExceptionBuilder<T extends ServiceException>
-
- Type Parameters:
T- the type parameter
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractServiceExceptionBuilder
public interface ServiceExceptionBuilder<T extends ServiceException> extends Serializable
The service exception builder.- Author:
- Christian Bremer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tbuild()Build the service exception.ServiceExceptionBuilder<T>cause(Throwable cause)sets cause on service exception builder.ServiceExceptionBuilder<T>errorCode(String errorCode)Sets error code on service exception builder.ServiceExceptionBuilder<T>httpStatus(int httpStatus)Sets http status on service exception builder.ServiceExceptionBuilder<T>reason(String reason)Sets reason on service exception builder.
-
-
-
Method Detail
-
httpStatus
ServiceExceptionBuilder<T> httpStatus(int httpStatus)
Sets http status on service exception builder.- Parameters:
httpStatus- the http status- Returns:
- the service exception builder
-
errorCode
ServiceExceptionBuilder<T> errorCode(String errorCode)
Sets error code on service exception builder.- Parameters:
errorCode- the error code- Returns:
- the service exception builder
-
reason
ServiceExceptionBuilder<T> reason(String reason)
Sets reason on service exception builder.- Parameters:
reason- the reason- Returns:
- the service exception builder
-
cause
ServiceExceptionBuilder<T> cause(Throwable cause)
sets cause on service exception builder.- Parameters:
cause- the cause- Returns:
- the service exception builder
-
build
T build()
Build the service exception.- Returns:
- the service exception
-
-