Interface EmgMessage

All Known Implementing Classes:
BillingNotification, FabricNotification, IbxNotification, ManagedServiceNotification, NetworkNotification, OrderNotification, UnknownNotification

A parsed Equinix Messaging Gateway notification. The hierarchy is sealed, so a switch over it is checked for exhaustiveness by the compiler:
switch (message) {
    case IbxNotification m -> ...;
    case NetworkNotification m -> ...;
    case FabricNotification m -> ...;
    case BillingNotification m -> ...;
    case OrderNotification m -> ...;
    case ManagedServiceNotification m -> ...;
    case UnknownNotification m -> ...;
}

Every implementation is an immutable record carrying the common EmgHeader and the exact JSON text it was parsed from (rawJson()).

  • Method Summary

    Modifier and Type
    Method
    Description
    The header attributes shared by every notification.
    default String
    id()
    Shortcut for header().id(): EMG delivers at least once, so use this as the key to de-duplicate redelivered notifications.
    The complete envelope exactly as received (UTF-8 decoded, BOM removed), for auditing or for fields this SDK version does not model.
  • Method Details

    • header

      EmgHeader header()
      The header attributes shared by every notification.
      Returns:
      the header, never null
    • rawJson

      String rawJson()
      The complete envelope exactly as received (UTF-8 decoded, BOM removed), for auditing or for fields this SDK version does not model.
      Returns:
      the raw JSON text
    • id

      default String id()
      Shortcut for header().id(): EMG delivers at least once, so use this as the key to de-duplicate redelivered notifications.
      Returns:
      the message id, or null if the notification carried none