Interface MamaBasicSubscriptionCallback


  • public interface MamaBasicSubscriptionCallback
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onCreate​(MamaBasicSubscription subscription)
      Method invoked when subscription creation is complete, and before any calls to onMsg.
      void onDestroy​(MamaBasicSubscription subscription)
      This method is invoked when a subscription has been completely destroyed or deactivated, the client can have confidence that no further messages will be placed on the queue for this subscription.
      void onError​(MamaBasicSubscription subscription, short wombatStatus, int platformError, java.lang.String subject)
      Invoked if an error occurs during prior to subscriptionBridge creation or if the subscriptionBridge receives a message for an unentitled subject.
      void onMsg​(MamaBasicSubscription subscription, MamaMsg msg)
      Invoked when a message arrives.
    • Method Detail

      • onCreate

        void onCreate​(MamaBasicSubscription subscription)
        Method invoked when subscription creation is complete, and before any calls to onMsg. Since subscriptions are created asynchronous by throttle, this callback provides the subscription instance after the throttle processes the creation request.
        Parameters:
        subscription - The subscription.
      • onError

        void onError​(MamaBasicSubscription subscription,
                     short wombatStatus,
                     int platformError,
                     java.lang.String subject)
        Invoked if an error occurs during prior to subscriptionBridge creation or if the subscriptionBridge receives a message for an unentitled subject.

        If the status is MamaStatus.NOT_ENTITTLED the subject parameter is the specific unentitled subject. If the subscriptionBridge subject contains wildcards, the subscriptionBridge may still receive messages for other entitled subjects.

        Parameters:
        subscription - The subscriptionBridge.
        wombatStatus - The wombat error code.
        platformError - Third party, platform specific messaging error.
        subject - The subject for NOT_ENTITLED
      • onMsg

        void onMsg​(MamaBasicSubscription subscription,
                   MamaMsg msg)
        Invoked when a message arrives.
        Parameters:
        subscription - the MamaSubscription.
        msg - The MamaMsg.
      • onDestroy

        void onDestroy​(MamaBasicSubscription subscription)
        This method is invoked when a subscription has been completely destroyed or deactivated, the client can have confidence that no further messages will be placed on the queue for this subscription.
        Parameters:
        subscription - The MamaBasicSubscription.