use of net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method subscribeSCSCFName.
public String subscribeSCSCFName(String publicIdentity, int subscriptionRequestType, String destinationRealm, String destinationHost) throws IOException {
UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
SubscribeNotificationsRequest snr = diameterShClientMessageFactory.createSubscribeNotificationsRequest(publicIdentityAvp, DataReferenceType.S_CSCFNAME, SubsReqType.fromInt(subscriptionRequestType));
snr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
// Set destination -- Realm is mandatory, host is optional
snr.setDestinationRealm(new DiameterIdentity(destinationRealm));
if (destinationHost != null) {
snr.setDestinationHost(new DiameterIdentity(destinationHost));
}
ShClientActivity activity = getShClientActivity();
activity.sendSubscribeNotificationsRequest(snr);
// Store request for future matching
storeRequestInACI(activity, snr);
// Return Session-Id, may be used as identifier
return activity.getSessionId();
}
use of net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method subscribeInitialFilterCriteria.
public String subscribeInitialFilterCriteria(String publicIdentity, String serverName, int subscriptionRequestType, String destinationRealm, String destinationHost) throws IOException {
UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
SubscribeNotificationsRequest snr = diameterShClientMessageFactory.createSubscribeNotificationsRequest(publicIdentityAvp, DataReferenceType.INITIAL_FILTER_CRITERIA, SubsReqType.fromInt(subscriptionRequestType));
snr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
snr.setServerName(serverName);
// Set destination -- Realm is mandatory, host is optional
snr.setDestinationRealm(new DiameterIdentity(destinationRealm));
if (destinationHost != null) {
snr.setDestinationHost(new DiameterIdentity(destinationHost));
}
ShClientActivity activity = getShClientActivity();
activity.sendSubscribeNotificationsRequest(snr);
// Store request for future matching
storeRequestInACI(activity, snr);
// Return Session-Id, may be used as identifier
return activity.getSessionId();
}
use of net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method subscribePSIActivation.
public String subscribePSIActivation(String publicIdentity, int subscriptionRequestType, String destinationRealm, String destinationHost) throws IOException {
UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
SubscribeNotificationsRequest snr = diameterShClientMessageFactory.createSubscribeNotificationsRequest(publicIdentityAvp, DataReferenceType.PSI_ACTIVATION, SubsReqType.fromInt(subscriptionRequestType));
snr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
// Set destination -- Realm is mandatory, host is optional
snr.setDestinationRealm(new DiameterIdentity(destinationRealm));
if (destinationHost != null) {
snr.setDestinationHost(new DiameterIdentity(destinationHost));
}
ShClientActivity activity = getShClientActivity();
activity.sendSubscribeNotificationsRequest(snr);
// Store request for future matching
storeRequestInACI(activity, snr);
// Return Session-Id, may be used as identifier
return activity.getSessionId();
}
use of net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method subscribeRepositoryData.
public String subscribeRepositoryData(String publicIdentity, byte[][] serviceIndications, int subscriptionRequestType, String destinationRealm, String destinationHost) throws IOException {
UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
SubscribeNotificationsRequest snr = diameterShClientMessageFactory.createSubscribeNotificationsRequest(publicIdentityAvp, DataReferenceType.REPOSITORY_DATA, SubsReqType.fromInt(subscriptionRequestType));
snr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
snr.setServiceIndications(serviceIndications);
// Set destination -- Realm is mandatory, host is optional
snr.setDestinationRealm(new DiameterIdentity(destinationRealm));
if (destinationHost != null) {
snr.setDestinationHost(new DiameterIdentity(destinationHost));
}
ShClientActivity activity = getShClientActivity();
activity.sendSubscribeNotificationsRequest(snr);
// Store request for future matching
storeRequestInACI(activity, snr);
// Return Session-Id, may be used as identifier
return activity.getSessionId();
}
use of net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest in project jain-slee.diameter by RestComm.
the class ShServerActivityImpl method createSubscribeNotificationsAnswer.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diameter.sh.server.ShServerActivity#createSubscribeNotificationsAnswer(long, boolean)
*/
public SubscribeNotificationsAnswer createSubscribeNotificationsAnswer(long resultCode, boolean isExperimentalResult) {
// Fetch the session stored request
SubscribeNotificationsRequest req = (SubscribeNotificationsRequest) getSessionMessage(SubscribeNotificationsRequest.commandCode);
SubscribeNotificationsAnswer answer = null;
if (req != null) {
// Create answer from it
answer = this.messageFactory.createSubscribeNotificationsAnswer(req, resultCode, isExperimentalResult);
// Add any extra session data
addSessionData(answer);
// Store request data FIXME: Commented by Alex. Is this needed?
// ((DiameterShMessageImpl)answer).setData(req);
}
return answer;
}
Aggregations