Interface EmgMessageHandler


public interface EmgMessageHandler
Callback interface for typed EMG notifications. Override the callbacks for the types you care about; the rest default to no-ops (the message is then treated as handled). handle(EmgMessage) dispatches with an exhaustive switch over the sealed EmgMessage hierarchy.

Handlers must be idempotent. EMG (Azure Service Bus) delivers at least once: a message is redelivered if its lock expires or settlement fails, so the same EmgMessage.id() can arrive more than once. Throwing from a callback signals failure; the transport adapter then abandons the message so it is redelivered.

  • Method Details

    • onIbxNotification

      default void onIbxNotification(IbxNotification message) throws Exception
      IBX (data center) maintenance, incident, security incident or advisory.
      Parameters:
      message - the notification
      Throws:
      Exception - to have the message redelivered
    • onNetworkNotification

      default void onNetworkNotification(NetworkNotification message) throws Exception
      Network maintenance or incident.
      Parameters:
      message - the notification
      Throws:
      Exception - to have the message redelivered
    • onFabricNotification

      default void onFabricNotification(FabricNotification message) throws Exception
      Fabric port or virtual connection up/down.
      Parameters:
      message - the notification
      Throws:
      Exception - to have the message redelivered
    • onBillingNotification

      default void onBillingNotification(BillingNotification message) throws Exception
      Billing started for a closed order.
      Parameters:
      message - the notification
      Throws:
      Exception - to have the message redelivered
    • onOrderNotification

      default void onOrderNotification(OrderNotification message) throws Exception
      Order status update.
      Parameters:
      message - the notification
      Throws:
      Exception - to have the message redelivered
    • onManagedServiceNotification

      default void onManagedServiceNotification(ManagedServiceNotification message) throws Exception
      Managed Services trouble ticket or service request.
      Parameters:
      message - the notification
      Throws:
      Exception - to have the message redelivered
    • onUnknownNotification

      default void onUnknownNotification(UnknownNotification message) throws Exception
      A well-formed envelope of a type this SDK version does not model.
      Parameters:
      message - the notification, with its body preserved verbatim
      Throws:
      Exception - to have the message redelivered
    • handle

      default void handle(EmgMessage message) throws Exception
      Dispatches message to the matching callback.
      Parameters:
      message - the parsed message
      Throws:
      Exception - whatever the callback throws