Class TransactionManager
- java.lang.Object
-
- org.prebid.mobile.rendering.loading.TransactionManager
-
- All Implemented Interfaces:
AdLoadListener,Transaction.Listener
public class TransactionManager extends java.lang.Object implements AdLoadListener, Transaction.Listener
-
-
Constructor Summary
Constructors Constructor Description TransactionManager(android.content.Context context, TransactionManagerListener listener, InterstitialManager interstitialManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()TransactiondismissCurrentTransaction()Removes the current transaction from internal cachevoidfetchBidTransaction(AdUnitConfiguration adConfiguration, BidResponse bidResponse)Initiates the process of creating creative model and transaction from parsed bid responsevoidfetchVideoTransaction(AdUnitConfiguration adConfiguration, java.lang.String vastXml)AbstractCreativegetCurrentCreative()TransactiongetCurrentTransaction()Returns the transaction that should be displayed right now.booleanhasNextCreative()booleanhasTransaction()voidincrementCreativesCounter()voidonCreativeModelReady(CreativeModelsMaker.Result result)voidonFailedToLoadAd(AdException e, java.lang.String vastLoaderIdentifier)voidonTransactionFailure(AdException e, java.lang.String identifier)voidonTransactionSuccess(Transaction transaction)voidresetState()
-
-
-
Constructor Detail
-
TransactionManager
public TransactionManager(android.content.Context context, TransactionManagerListener listener, InterstitialManager interstitialManager)
-
-
Method Detail
-
onCreativeModelReady
public void onCreativeModelReady(CreativeModelsMaker.Result result)
- Specified by:
onCreativeModelReadyin interfaceAdLoadListener
-
onFailedToLoadAd
public void onFailedToLoadAd(AdException e, java.lang.String vastLoaderIdentifier)
- Specified by:
onFailedToLoadAdin interfaceAdLoadListener
-
onTransactionSuccess
public void onTransactionSuccess(Transaction transaction)
- Specified by:
onTransactionSuccessin interfaceTransaction.Listener
-
onTransactionFailure
public void onTransactionFailure(AdException e, java.lang.String identifier)
- Specified by:
onTransactionFailurein interfaceTransaction.Listener
-
fetchBidTransaction
public void fetchBidTransaction(AdUnitConfiguration adConfiguration, BidResponse bidResponse)
Initiates the process of creating creative model and transaction from parsed bid response- Parameters:
adConfiguration- - AdConfigurationbidResponse- - parsed bid response
-
fetchVideoTransaction
public void fetchVideoTransaction(AdUnitConfiguration adConfiguration, java.lang.String vastXml)
-
getCurrentTransaction
public Transaction getCurrentTransaction()
Returns the transaction that should be displayed right now.- Returns:
- first transaction
-
dismissCurrentTransaction
public Transaction dismissCurrentTransaction()
Removes the current transaction from internal cache- Returns:
- the next transactions in the list
-
getCurrentCreative
public AbstractCreative getCurrentCreative()
-
hasNextCreative
public boolean hasNextCreative()
-
resetState
public void resetState()
-
hasTransaction
public boolean hasTransaction()
-
destroy
public void destroy()
-
incrementCreativesCounter
public void incrementCreativesCounter()
-
-