Package com.avaya.core
Class AvMessagingSdkCallback.Response.Builder<T>
- java.lang.Object
-
- com.avaya.core.AvMessagingSdkCallback.Response.Builder<T>
-
- Type Parameters:
T
- the type of the resulting data from the action being performed
- Enclosing class:
- AvMessagingSdkCallback.Response<T>
public static class AvMessagingSdkCallback.Response.Builder<T> extends java.lang.Object
Builder for creating instances ofAvMessagingSdkCallback.Response
with a status code and any additional information required for the callback being notified.
-
-
Constructor Summary
Constructors Constructor Description Builder(int status)
Constructs an instance of thisAvMessagingSdkCallback.Response.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AvMessagingSdkCallback.Response<T>
build()
Builds theAvMessagingSdkCallback.Response
with the provided informationAvMessagingSdkCallback.Response.Builder<T>
withData(T data)
Adds data to the response builderAvMessagingSdkCallback.Response.Builder<T>
withError(java.lang.String error)
Adds an error message to the response builder
-
-
-
Constructor Detail
-
Builder
public Builder(int status)
Constructs an instance of thisAvMessagingSdkCallback.Response.Builder
- Parameters:
status
- the status code of the action being performed
-
-
Method Detail
-
withError
public AvMessagingSdkCallback.Response.Builder<T> withError(java.lang.String error)
Adds an error message to the response builder- Parameters:
error
- the error message to be added to theAvMessagingSdkCallback.Response
- Returns:
- this
AvMessagingSdkCallback.Response.Builder
-
withData
public AvMessagingSdkCallback.Response.Builder<T> withData(T data)
Adds data to the response builder- Parameters:
data
- the data to be added to theAvMessagingSdkCallback.Response
- Returns:
- this
AvMessagingSdkCallback.Response.Builder
-
build
public AvMessagingSdkCallback.Response<T> build()
Builds theAvMessagingSdkCallback.Response
with the provided information- Returns:
- an instance of
AvMessagingSdkCallback.Response
-
-