Interface ShServerActivity
-
public interface ShServerActivityActivity used by a Diameter Sh Server. The following request messages can be fired as events:- UserDataRequest
- ProfileUpdateRequest
- SubscribeNotificationsRequest
- UserDataAnswer
- ProfileUpdateAnswer
- SubscribeNotificationsAnswer
- Author:
- Open Cloud
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProfileUpdateAnswercreateProfileUpdateAnswer()Create an empty ProfileUpdateAnswer that will need to have AVPs set on it before being sent.ProfileUpdateAnswercreateProfileUpdateAnswer(long resultCode, boolean isExperimentalResult)Create a ProfileUpdateAnswer containing a Result-Code or Experimental-Result AVP populated with the given value.SubscribeNotificationsAnswercreateSubscribeNotificationsAnswer()Create an empty SubscribeNotificationsAnswer that will need to have AVPs set on it before being sent.SubscribeNotificationsAnswercreateSubscribeNotificationsAnswer(long resultCode, boolean isExperimentalResult)Create a SubscribeNotificationsAnswer containing a Result-Code or Experimental-Result AVP populated with the given value.UserDataAnswercreateUserDataAnswer()Create an empty UserDataAnswer that will need to have AVPs set on it before being sent.UserDataAnswercreateUserDataAnswer(long resultCode, boolean isExperimentalResult)Create a UserDataAnswer containing a Result-Code or Experimental-Result AVP populated with the given value.UserDataAnswercreateUserDataAnswer(UserData userData)Create a UserDataAnswer using the given parameter to populate the User-Data AVP.voidendActivity()End this activity.ShMessageFactorygetMessageFactory()Get a message factory to create answer messages and AVPs (if necessary).voidsendProfileUpdateAnswer(ProfileUpdateAnswer message)Send the ProfileUpdateAnswer to the peer that sent the ProfileUpdateRequest.voidsendSubscribeNotificationsAnswer(SubscribeNotificationsAnswer message)Send the SubscribeNotificationsAnswer to the peer that sent the SubscribeNotificationsRequest.voidsendUserDataAnswer(UserDataAnswer message)Send the UserDataAnswer to the peer that sent the UserDataRequest.
-
-
-
Method Detail
-
getMessageFactory
ShMessageFactory getMessageFactory()
Get a message factory to create answer messages and AVPs (if necessary).
-
createUserDataAnswer
UserDataAnswer createUserDataAnswer(UserData userData)
Create a UserDataAnswer using the given parameter to populate the User-Data AVP. The Result-Code AVP is automatically set toDiameterResultCode.DIAMETER_SUCCESS.- Returns:
- a UserDataAnswer object that can be sent using {@link ShServerActivity\#sendUserDataAnswer(org.jainslee.resources.diameter.sh.types.v940.UserDataAnswer)}
-
createUserDataAnswer
UserDataAnswer createUserDataAnswer(long resultCode, boolean isExperimentalResult)
Create a UserDataAnswer containing a Result-Code or Experimental-Result AVP populated with the given value. IfisExperimentalResultCodeistrue, theresultCodeparameter will be set in aExperimentalResultAVP, if it isfalsethe result code will be set in a Result-Code AVP.- Returns:
- a UserDataAnswer object that can be sent using {@link ShServerActivity\#sendUserDataAnswer(org.jainslee.resources.diameter.sh.types.v940.UserDataAnswer)}
-
createUserDataAnswer
UserDataAnswer createUserDataAnswer()
Create an empty UserDataAnswer that will need to have AVPs set on it before being sent.- Returns:
- a UserDataAnswer object that can be sent using {@link ShServerActivity\#sendUserDataAnswer(org.jainslee.resources.diameter.sh.types.v940.UserDataAnswer)}
-
createProfileUpdateAnswer
ProfileUpdateAnswer createProfileUpdateAnswer(long resultCode, boolean isExperimentalResult)
Create a ProfileUpdateAnswer containing a Result-Code or Experimental-Result AVP populated with the given value. IfisExperimentalResultCodeistrue, theresultCodeparameter will be set in aExperimentalResultAVP, if it isfalsethe result code will be set in a Result-Code AVP.- Returns:
- a ProfileUpdateAnswer object that can be sent using {@link ShServerActivity\#sendProfileUpdateAnswer(org.jainslee.resources.diameter.sh.types.v940.ProfileUpdateAnswer)}
-
createProfileUpdateAnswer
ProfileUpdateAnswer createProfileUpdateAnswer()
Create an empty ProfileUpdateAnswer that will need to have AVPs set on it before being sent.- Returns:
- a ProfileUpdateAnswer object that can be sent using {@link ShServerActivity\#sendProfileUpdateAnswer(org.jainslee.resources.diameter.sh.types.v940.ProfileUpdateAnswer)}
-
createSubscribeNotificationsAnswer
SubscribeNotificationsAnswer createSubscribeNotificationsAnswer(long resultCode, boolean isExperimentalResult)
Create a SubscribeNotificationsAnswer containing a Result-Code or Experimental-Result AVP populated with the given value. IfisExperimentalResultCodeistrue, theresultCodeparameter will be set in aExperimentalResultAVP, if it isfalsethe result code will be set in a Result-Code AVP.- Returns:
- a SubscribeNotificationsAnswer object that can be sent using {@link ShServerActivity\#sendSubscribeNotificationsAnswer(org.jainslee.resources.diameter.sh.types.v940.SubscribeNotificationsAnswer)}
-
createSubscribeNotificationsAnswer
SubscribeNotificationsAnswer createSubscribeNotificationsAnswer()
Create an empty SubscribeNotificationsAnswer that will need to have AVPs set on it before being sent.- Returns:
- a SubscribeNotificationsAnswer object that can be sent using {@link ShServerActivity\#sendSubscribeNotificationsAnswer(org.jainslee.resources.diameter.sh.types.v940.SubscribeNotificationsAnswer)}
-
sendUserDataAnswer
void sendUserDataAnswer(UserDataAnswer message) throws SendException
Send the UserDataAnswer to the peer that sent the UserDataRequest.- Throws:
SendException
-
sendProfileUpdateAnswer
void sendProfileUpdateAnswer(ProfileUpdateAnswer message) throws SendException
Send the ProfileUpdateAnswer to the peer that sent the ProfileUpdateRequest.- Throws:
SendException
-
sendSubscribeNotificationsAnswer
void sendSubscribeNotificationsAnswer(SubscribeNotificationsAnswer message) throws SendException
Send the SubscribeNotificationsAnswer to the peer that sent the SubscribeNotificationsRequest.- Throws:
SendException
-
endActivity
void endActivity()
End this activity. This does not cause any messages to be sent, it simply ends the activity in the SLEE.
-
-