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 typeorg.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 anShClientSubscriptionActivity
.- Author:
- Open Cloud
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
endActivity()
End this activity.ShMessageFactory
getMessageFactory()
Get a message factory to create a PushNotificationAnswer and AVPs.void
sendPushNotificationAnswer(long resultCode, boolean isExperimentalResultCode)
Convenience method to create and send a PushNotificationAnswer containing a Result-Code or Experimental-Result AVP populated with the given value.void
sendPushNotificationAnswer(PushNotificationAnswer message)
Send a manually-constructed PushNotificationAnswer to the peer that sent the PushNotificationRequest.void
sendSuccessPushNotificationAnswer()
Convenience method to create and send a PushNotificationAnswer containing a Result-Code set toDiameterResultCode.DIAMETER_SUCCESS
.
-
-
-
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 callingShMessageFactory.createPushNotificationAnswer(long, boolean)
followed by {@link \#sendPushNotificationAnswer(org.jainslee.resources.diameter.sh.types.vb60.PushNotificationAnswer)}.- Throws:
SendException
- if the message could not be sent
-
sendSuccessPushNotificationAnswer
void sendSuccessPushNotificationAnswer() throws SendException
Convenience method to create and send a PushNotificationAnswer containing a Result-Code set toDiameterResultCode.DIAMETER_SUCCESS
. This is equivalent of callingShMessageFactory.createPushNotificationAnswer(long, boolean)
with arguments (DiameterResultCode.DIAMETER_SUCCESS, false) followed by {@link \#sendPushNotificationAnswer(org.jainslee.resources.diameter.sh.types.vb60.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.
-
-