Class DhApiResult<T>
java.lang.Object
com.seibel.distanthorizons.api.objects.DhApiResult<T>
- Type Parameters:
T
- The payload type this result contains, can be Void if the result is just used to notify success/failure.
Allows for more descriptive non-critical failure states.
- Since:
- API 1.0.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <Pt> DhApiResult
<Pt> createFail
(String message) static <Pt> DhApiResult
<Pt> createFail
(String message, Pt payload) static <Pt> DhApiResult
<Pt> static <Pt> DhApiResult
<Pt> createSuccess
(String message, Pt payload) static <Pt> DhApiResult
<Pt> createSuccess
(Pt payload)
-
Field Details
-
success
public final boolean successTrue if the action succeeded, false otherwise. -
message
If the action failed this will contain the reason as to why.
If the action was successful this will generally be the empty string. -
payload
Whatever object the API Method generated/returned.
Will be null/Void if this result is just used to notify success/failure.
-
-
Method Details
-
createSuccess
-
createSuccess
-
createSuccess
-
createFail
-
createFail
-