Interface OreResponse<V>
-
- All Known Implementing Classes:
OreResponse.Failure
,OreResponse.Reauthenticate
,OreResponse.Success
public interface OreResponse<V>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
OreResponse.Failure<T>
static class
OreResponse.Reauthenticate<T>
static class
OreResponse.Success<T>
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <E extends java.lang.Throwable>
OreResponse.Success<V>asSuccessOrThrow(java.util.function.Function<java.lang.String,E> errorProvider)
static <T> @NotNull OreResponse.Failure<T>
failure(int responseCode, @Nullable java.lang.String errorMessage)
static <T> @NotNull OreResponse.Reauthenticate<T>
reauthenticate()
int
responseCode()
static <T> @NotNull OreResponse.Success<T>
success(T value)
boolean
wasSuccessful()
-
-
-
Method Detail
-
success
@NotNull static <T> @NotNull OreResponse.Success<T> success(@Nullable T value)
-
reauthenticate
@NotNull static <T> @NotNull OreResponse.Reauthenticate<T> reauthenticate()
-
failure
@NotNull static <T> @NotNull OreResponse.Failure<T> failure(int responseCode, @Nullable @Nullable java.lang.String errorMessage)
-
wasSuccessful
boolean wasSuccessful()
-
responseCode
int responseCode()
-
asSuccessOrThrow
<E extends java.lang.Throwable> OreResponse.Success<V> asSuccessOrThrow(java.util.function.Function<java.lang.String,E> errorProvider) throws E extends java.lang.Throwable
- Throws:
E extends java.lang.Throwable
-
-