Class OreResponse.Failure<T>
- java.lang.Object
-
- org.spongepowered.gradle.ore.internal.OreResponse.Failure<T>
-
- All Implemented Interfaces:
OreResponse<T>
- Enclosing interface:
- OreResponse<V>
public static final class OreResponse.Failure<T> extends java.lang.Object implements OreResponse<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.gradle.ore.internal.OreResponse
OreResponse.Failure<T>, OreResponse.Reauthenticate<T>, OreResponse.Success<T>
-
-
Constructor Summary
Constructors Constructor Description Failure(int responseCode, @Nullable java.lang.String errorMessage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <E extends java.lang.Throwable>
OreResponse.Success<T>asSuccessOrThrow(java.util.function.Function<java.lang.String,E> errorProvider)
@Nullable java.lang.String
errorMessage()
int
responseCode()
boolean
wasSuccessful()
-
-
-
Method Detail
-
errorMessage
@Nullable public @Nullable java.lang.String errorMessage()
-
wasSuccessful
public boolean wasSuccessful()
- Specified by:
wasSuccessful
in interfaceOreResponse<T>
-
responseCode
public int responseCode()
- Specified by:
responseCode
in interfaceOreResponse<T>
-
asSuccessOrThrow
public <E extends java.lang.Throwable> OreResponse.Success<T> asSuccessOrThrow(java.util.function.Function<java.lang.String,E> errorProvider) throws E extends java.lang.Throwable
- Specified by:
asSuccessOrThrow
in interfaceOreResponse<T>
- Throws:
E extends java.lang.Throwable
-
-