Interface ShClientNotificationActivity


  • public interface ShClientNotificationActivity
    Activity used by a Diameter Sh client to receive Push-Notification-Request messages and send Push-Notification-Answer messages.

    The PushNotificationRequest event will cause this activity to be created, and the activity will end when the answer is sent.

    Push-Notification-Request messages are fired on this activity as events of type org.jainslee.resources.diameter.sh.PushNotificationRequest.

    This activity is created by the RA upon receipt of a Push-Notification-Request for a subscription that is not associated with an ShClientSubscriptionActivity.

    Author:
    Open Cloud
    • Method Detail

      • getMessageFactory

        ShMessageFactory getMessageFactory()
        Get a message factory to create a PushNotificationAnswer and AVPs.
      • sendPushNotificationAnswer

        void sendPushNotificationAnswer​(PushNotificationAnswer message)
                                 throws SendException
        Send a manually-constructed PushNotificationAnswer to the peer that sent the PushNotificationRequest.
        Throws:
        SendException - if the message could not be sent
      • sendPushNotificationAnswer

        void sendPushNotificationAnswer​(long resultCode,
                                        boolean isExperimentalResultCode)
                                 throws SendException
        Convenience method to create and send a PushNotificationAnswer containing a Result-Code or Experimental-Result AVP populated with the given value.

        This is equivalent of calling ShMessageFactory.createPushNotificationAnswer(long, boolean) followed by {@link \#sendPushNotificationAnswer(org.jainslee.resources.diameter.sh.types.v880.PushNotificationAnswer)}.

        Throws:
        SendException - if the message could not be sent
      • endActivity

        void endActivity()
        End this activity. This does not cause any messages to be sent, it simply ends the activity in the SLEE.