public interface ShClientSubscriptionActivity
org.jainslee.resources.diameter.sh.SubscribedPushNotificationRequest
and
Subscribe-Notifications-Answer messages are fired as events of type
org.jainslee.resources.diameter.sh.SubscribeNotificationsAnswer
.
This activity is created by a call to org.jainslee.resources.diameter.sh.ShProvider#createShClientSubscriptionActivity()
.
Modifier and Type | Method and Description |
---|---|
ShMessageFactory |
getMessageFactory()
Get a message factory to manually create SubscribeNotificationsRequests, PushNotificationAnswers and AVPs.
|
UserIdentity |
getSubscribedUserIdentity()
Return the User-Identity for the subscription in the HSS represented by this activity.
|
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.
This is equivalent of calling
ShMessageFactory.createPushNotificationAnswer(long, boolean) followed by
sendPushNotificationAnswer(org.jainslee.resources.diameter.sh.types.va10.PushNotificationAnswer) . |
void |
sendPushNotificationAnswer(PushNotificationAnswer message)
Send a manually-constructed PushNotificationAnswer to the peer that sent the PushNotificationRequest.
|
void |
sendSubscribeNotificationsRequest(SubscribeNotificationsRequest message)
Send a Subscribe-Notifications-Request message.
|
void |
sendSuccessPushNotificationAnswer()
Convenience method to create and send a PushNotificationAnswer containing a Result-Code set to
DiameterResultCode.DIAMETER_SUCCESS .
This is equivalent of calling ShMessageFactory.createPushNotificationAnswer(long, boolean) with
arguments (DiameterResultCode.DIAMETER_SUCCESS, false) followed by
sendPushNotificationAnswer(org.jainslee.resources.diameter.sh.types.va10.PushNotificationAnswer) . |
void |
sendUnsubscribeRequest()
Send a Subscribe-Notifications-Request message containing the AVPs required to UNSUBSCRIBE from the
user that this activity represents a subscription to.
|
ShMessageFactory getMessageFactory()
void sendSubscribeNotificationsRequest(SubscribeNotificationsRequest message) throws SendException
message
- request message to sendSendException
- if the request message could not be sentvoid sendUnsubscribeRequest() throws SendException
SendException
- if the request message could not be sentvoid sendPushNotificationAnswer(PushNotificationAnswer message) throws SendException
SendException
- if the message could not be sentvoid sendPushNotificationAnswer(long resultCode, boolean isExperimentalResultCode) throws SendException
ShMessageFactory.createPushNotificationAnswer(long, boolean)
followed by
sendPushNotificationAnswer(org.jainslee.resources.diameter.sh.types.va10.PushNotificationAnswer)
.SendException
- if the message could not be sentvoid sendSuccessPushNotificationAnswer() throws SendException
DiameterResultCode.DIAMETER_SUCCESS
.
This is equivalent of calling ShMessageFactory.createPushNotificationAnswer(long, boolean)
with
arguments (DiameterResultCode.DIAMETER_SUCCESS, false) followed by
sendPushNotificationAnswer(org.jainslee.resources.diameter.sh.types.va10.PushNotificationAnswer)
.SendException
- if the message could not be sentUserIdentity getSubscribedUserIdentity()
sendSubscribeNotificationsRequest(org.jainslee.resources.diameter.sh.types.va10.SubscribeNotificationsRequest)
.