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 Summary
Modifier and TypeMethodDescriptiondefault voidhandle(EmgMessage message) Dispatchesmessageto the matching callback.default voidonBillingNotification(BillingNotification message) Billing started for a closed order.default voidonFabricNotification(FabricNotification message) Fabric port or virtual connection up/down.default voidonIbxNotification(IbxNotification message) IBX (data center) maintenance, incident, security incident or advisory.default voidManaged Services trouble ticket or service request.default voidonNetworkNotification(NetworkNotification message) Network maintenance or incident.default voidonOrderNotification(OrderNotification message) Order status update.default voidonUnknownNotification(UnknownNotification message) A well-formed envelope of a type this SDK version does not model.
-
Method Details
-
onIbxNotification
IBX (data center) maintenance, incident, security incident or advisory.- Parameters:
message- the notification- Throws:
Exception- to have the message redelivered
-
onNetworkNotification
Network maintenance or incident.- Parameters:
message- the notification- Throws:
Exception- to have the message redelivered
-
onFabricNotification
Fabric port or virtual connection up/down.- Parameters:
message- the notification- Throws:
Exception- to have the message redelivered
-
onBillingNotification
Billing started for a closed order.- Parameters:
message- the notification- Throws:
Exception- to have the message redelivered
-
onOrderNotification
Order status update.- Parameters:
message- the notification- Throws:
Exception- to have the message redelivered
-
onManagedServiceNotification
Managed Services trouble ticket or service request.- Parameters:
message- the notification- Throws:
Exception- to have the message redelivered
-
onUnknownNotification
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
Dispatchesmessageto the matching callback.- Parameters:
message- the parsed message- Throws:
Exception- whatever the callback throws
-