org.osgi.service.dmt.notification.NotificationService when sending
alerts. Implementations of this interface have to be able to connect and send
alerts to one or more management servers in a protocol specific way.
The properties of the service registration should specify a list of
destinations (principals) where the service is capable of sending alerts.
This can be done by providing a String array of principal names in
the principals registration property. If this property is not
registered, the service will be treated as the default sender. The default
alert sender is only used when a more specific alert sender cannot be found.
The principals registration property is used when the
org.
method is called, to find the proper RemoteAlertSender for the given
destination. If the caller does not specify a principal, the alert is only
sent if the Notification Sender finds a default alert sender, or if the
choice is unambiguous for some other reason (for example if only one alert
sender is registered).
| Modifier and Type | Method and Description |
|---|---|
| public void | sendAlert(String
the name identifying the server where the alert should
be sent, can be principal, int nullthe alert code, can be 0 if not needed code, String the correlation identifier of an associated EXEC
command, or correlator, AlertItem[] null if there is no associated EXECthe data of the alert items carried in this alert, can be
empty or items)null if no alert items are neededSends an alert to a server identified by its principal name. |
| sendAlert | back to summary |
|---|---|
| public void sendAlert(String principal, int code, String correlator, AlertItem[] items) throws Exception Sends an alert to a server identified by its principal name. In case the
alert is sent in response to a previous
The
Any exception thrown on this method will be propagated to the original
sender of the event, wrapped in a Since sending the alert and receiving acknowledgment for it is potentially a very time-consuming operation, alerts are sent asynchronously. This method should attempt to ensure that the alert can be sent successfully, and should throw an exception if it detects any problems. If the method returns without error, the alert is accepted for sending and the implementation must make a best-effort attempt to deliver it.
| |