public final class AlgoFailure extends AlgoResponse
| Modifier and Type | Field and Description |
|---|---|
AlgorithmException |
error |
| Constructor and Description |
|---|
AlgoFailure(AlgorithmException error) |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
as(java.lang.Class<T> returnClass)
Convert the result to a specific class
|
protected <T> T |
as(java.lang.reflect.Type returnType)
Convert the result to a specific type
|
java.lang.String |
asJsonString()
Return JSON representation of the result.
|
java.lang.String |
asString()
Return String representation of the result.
|
Metadata |
getMetadata() |
boolean |
isFailure() |
boolean |
isSuccess() |
aspublic AlgorithmException error
public AlgoFailure(AlgorithmException error)
public boolean isSuccess()
isSuccess in class AlgoResponsepublic boolean isFailure()
isFailure in class AlgoResponsepublic Metadata getMetadata() throws AlgorithmException
getMetadata in class AlgoResponseAlgorithmExceptionprotected <T> T as(java.lang.Class<T> returnClass)
throws AlgorithmException
AlgoResponseas in class AlgoResponseT - the type that the response will be deserialized intoreturnClass - the class used by the deserializer (should correspond with T)AlgorithmException - the error, if this is AlgoFailureprotected <T> T as(java.lang.reflect.Type returnType)
throws AlgorithmException
AlgoResponseas in class AlgoResponseT - the type that the response will be deserialized intoreturnType - the type used by the deserializer (should correspond with T)AlgorithmException - the error, if this is AlgoFailurepublic java.lang.String asJsonString()
throws AlgorithmException
AlgoResponseasJsonString in class AlgoResponseAlgorithmException - the error, if this is AlgoFailurepublic java.lang.String asString()
throws AlgorithmException
AlgoResponseasString in class AlgoResponseAlgorithmException - the error, if this is AlgoFailure