Class GenericResultObject<T,V extends GenericResultObject<?,?>>
java.lang.Object
com.kryptokrauts.aeternity.sdk.domain.GenericResultObject<T,V>
- Type Parameters:
T
- the generated ae result object class
- Direct Known Subclasses:
AccountResult
,ACIResult
,CheckTxInPoolResult
,ContractCallObjectModel
,DryRunTransactionResult
,DryRunTransactionResults
,EventModel
,GAObjectModel
,KeyBlockResult
,NameAuctionResult
,NameAuctionsResult
,NameClaimDetailModel
,NameEntryResult
,ObjectResultWrapper
,OracleQueriesResult
,OracleQueryResult
,PostTransactionResult
,RegisteredOracleResult
,StatusResult
,StringResultWrapper
,TransactionInfoResult
,TransactionResult
,TransactionResults
public abstract class GenericResultObject<T,V extends GenericResultObject<?,?>>
extends java.lang.Object
This class encapsules the mapping of generated result objects and takes care of error handling.
This is done to keep the SDK stable in terms of changes within the underlying AE protocol
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
_logger
protected java.lang.String
aeAPIErrorMessage
protected java.lang.String
rootErrorMessage
protected java.lang.Throwable
throwable
-
Constructor Summary
Constructors Constructor Description GenericResultObject()
-
Method Summary
Modifier and Type Method Description io.reactivex.Single<V>
asyncGet(io.reactivex.Single<T> generatedResultObjectSingle)
execute an async call and return a mapped singleV
blockingGet(io.reactivex.Single<T> generatedResultObjectSingle)
execute a blocking call and return mapped resultprotected abstract java.lang.String
getResultObjectClassName()
protected abstract V
map(T generatedResultObject)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
rootErrorMessage
protected java.lang.String rootErrorMessage -
aeAPIErrorMessage
protected java.lang.String aeAPIErrorMessage -
throwable
protected java.lang.Throwable throwable -
_logger
protected static final org.slf4j.Logger _logger
-
-
Constructor Details
-
GenericResultObject
public GenericResultObject()
-
-
Method Details
-
blockingGet
execute a blocking call and return mapped result- Parameters:
generatedResultObjectSingle
- theSingle
of a result object of a generated api model class- Returns:
- the mapped result object
-
asyncGet
execute an async call and return a mapped single- Parameters:
generatedResultObjectSingle
- theSingle
of a result object of a generated api model class- Returns:
- a
Single
of the mapped result object
-
map
-
getResultObjectClassName
protected abstract java.lang.String getResultObjectClassName()
-