use of net.java.slee.resource.diameter.sh.client.ShClientActivity in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method updatePSIActivation.
public String updatePSIActivation(String publicIdentity, String data, String destinationRealm, String destinationHost) throws IOException {
UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
ProfileUpdateRequest pur = diameterShClientMessageFactory.createProfileUpdateRequest(publicIdentityAvp, DataReferenceType.PSI_ACTIVATION, data.getBytes());
pur.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
// Set destination -- Realm is mandatory, host is optional
pur.setDestinationRealm(new DiameterIdentity(destinationRealm));
if (destinationHost != null) {
pur.setDestinationHost(new DiameterIdentity(destinationHost));
}
ShClientActivity activity = getShClientActivity();
activity.sendProfileUpdateRequest(pur);
// Store request for future matching
storeRequestInACI(activity, pur);
// Return Session-Id, may be used as identifier
return activity.getSessionId();
}
use of net.java.slee.resource.diameter.sh.client.ShClientActivity in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method getIMSPublicIdentity.
public String getIMSPublicIdentity(String publicIdentity, byte[] msisdn, int[] identitySets, String destinationRealm, String destinationHost) throws IOException {
UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, msisdn);
UserDataRequest udr = diameterShClientMessageFactory.createUserDataRequest(publicIdentityAvp, DataReferenceType.IMS_PUBLIC_IDENTITY);
udr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
IdentitySetType[] typeIdentitySets = new IdentitySetType[identitySets.length];
for (int i = 0; i < identitySets.length; i++) {
typeIdentitySets[i] = IdentitySetType.fromInt(identitySets[i]);
}
udr.setIdentitySets(typeIdentitySets);
// Set destination -- Realm is mandatory, host is optional
udr.setDestinationRealm(new DiameterIdentity(destinationRealm));
if (destinationHost != null) {
udr.setDestinationHost(new DiameterIdentity(destinationHost));
}
ShClientActivity activity = getShClientActivity();
activity.sendUserDataRequest(udr);
// Store request for future matching
storeRequestInACI(activity, udr);
// Return Session-Id, may be used as identifier
return activity.getSessionId();
}
use of net.java.slee.resource.diameter.sh.client.ShClientActivity 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.client.ShClientActivity in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method getInitialFilterCriteria.
public String getInitialFilterCriteria(String publicIdentity, String serverName, String destinationRealm, String destinationHost) throws IOException {
UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
UserDataRequest udr = diameterShClientMessageFactory.createUserDataRequest(publicIdentityAvp, DataReferenceType.INITIAL_FILTER_CRITERIA);
udr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
udr.setServerName(serverName);
// Set destination -- Realm is mandatory, host is optional
udr.setDestinationRealm(new DiameterIdentity(destinationRealm));
if (destinationHost != null) {
udr.setDestinationHost(new DiameterIdentity(destinationHost));
}
ShClientActivity activity = getShClientActivity();
activity.sendUserDataRequest(udr);
// Store request for future matching
storeRequestInACI(activity, udr);
// Return Session-Id, may be used as identifier
return activity.getSessionId();
}
use of net.java.slee.resource.diameter.sh.client.ShClientActivity 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();
}
Aggregations