Interface WinLossNotifier

  • All Implemented Interfaces:

    
    public interface WinLossNotifier
    
                        

    Interface for handling Win/Loss notifications in auction-based advertising. This interface follows the Single Responsibility Principle (SRP) by focusing solely on auction outcome notifications.

    Implementing classes should handle the notification logic for when an ad wins or loses in an auction, including beacon firing and macro replacement.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract String notifyWin(Double minBidToWin) Notify that the bid for this ad was won.
      abstract String notifyLoss(Integer lossReason, Double auctionPrice) Notify that the bid for this ad was lost.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • notifyWin

         abstract String notifyWin(Double minBidToWin)

        Notify that the bid for this ad was won. This should be called only once per ad.

        Parameters:
        minBidToWin - The minimum bid amount required to win the auction
        Returns:

        An error message string if the notification failed, null if successful

      • notifyLoss

         abstract String notifyLoss(Integer lossReason, Double auctionPrice)

        Notify that the bid for this ad was lost. This should be called only once per ad.

        Parameters:
        lossReason - The reason code for losing the auction
        auctionPrice - The price of the winning bid in the auction
        Returns:

        An error message string if the notification failed, null if successful