Interface MamdaOrderBookCheckerHandler


  • public interface MamdaOrderBookCheckerHandler
    MamdaOrderBookCheckerHandler is an interface for applications that want to handle the results of the MamdaOrderBookChecker. Callback interfaces are provided for correct and erroneous checks.
    • Method Detail

      • onSuccess

        void onSuccess​(MamdaOrderBookCheckType checkType,
                       MamdaOrderBook realTimeBook)
        Method invoked when a successful check is completed.
        Parameters:
        checkType - Types of MamdaOrderBookChecks.
      • onInconclusive

        void onInconclusive​(MamdaOrderBookCheckType checkType,
                            java.lang.String reason)
        Method invoked when check is completed inconclusively. An attempt to check the order book may be inconclusive if the order book sequence numbers do not match up.
        Parameters:
        checkType - Types of MamdaOrderBookChecks.
        reason - Reason for the sequence numbers mismatch.
      • onFailure

        void onFailure​(MamdaOrderBookCheckType checkType,
                       java.lang.String reason,
                       com.wombat.mama.MamaMsg msg,
                       MamdaOrderBook realTimeBook,
                       MamdaOrderBook checkBook)
        Method invoked when a failed check is completed. The message provided, if non-NULL, is the one received for the snapshot or delta, depending upon the value of checkType.
        Parameters:
        checkType - Types of MamdaOrderBookChecks.
        reason - Reason for the failure.
        msg - The MamaMsg which caused failure.
        realTimeBook - The Real Time Order Book which is compared against.
        checkBook - The Aggregated Book which is compared.