Search in sources :

Example 16 with UserIdentityAvp

use of net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp 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();
}
Also used : ShClientActivity(net.java.slee.resource.diameter.sh.client.ShClientActivity) SubscribeNotificationsRequest(net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest) DiameterIdentity(net.java.slee.resource.diameter.base.events.avp.DiameterIdentity) UserIdentityAvp(net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp)

Example 17 with UserIdentityAvp

use of net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp in project jain-slee.diameter by RestComm.

the class HSSClientChildSbb method getMSISDN.

public String getMSISDN(String publicIdentity, byte[] msisdn, String destinationRealm, String destinationHost) throws IOException {
    UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, msisdn);
    UserDataRequest udr = diameterShClientMessageFactory.createUserDataRequest(publicIdentityAvp, DataReferenceType.MSISDN);
    udr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
    // 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();
}
Also used : ShClientActivity(net.java.slee.resource.diameter.sh.client.ShClientActivity) UserDataRequest(net.java.slee.resource.diameter.sh.events.UserDataRequest) DiameterIdentity(net.java.slee.resource.diameter.base.events.avp.DiameterIdentity) UserIdentityAvp(net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp)

Example 18 with UserIdentityAvp

use of net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp in project jain-slee.diameter by RestComm.

the class HSSClientChildSbb method getRepositoryData.

// -- SBB LOCAL OBJECT METHODS ----------------------------------------------
public String getRepositoryData(String publicIdentity, byte[][] serviceIndications, String destinationRealm, String destinationHost) throws IOException {
    UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
    UserDataRequest udr = diameterShClientMessageFactory.createUserDataRequest(publicIdentityAvp, DataReferenceType.REPOSITORY_DATA);
    udr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
    udr.setServiceIndications(serviceIndications);
    // 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();
}
Also used : ShClientActivity(net.java.slee.resource.diameter.sh.client.ShClientActivity) UserDataRequest(net.java.slee.resource.diameter.sh.events.UserDataRequest) DiameterIdentity(net.java.slee.resource.diameter.base.events.avp.DiameterIdentity) UserIdentityAvp(net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp)

Example 19 with UserIdentityAvp

use of net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp in project jain-slee.diameter by RestComm.

the class HSSClientChildSbb method getLocationInformation.

public String getLocationInformation(byte[] msisdn, int requestedDomain, String destinationRealm, String destinationHost) throws IOException {
    UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(null, msisdn);
    UserDataRequest udr = diameterShClientMessageFactory.createUserDataRequest(publicIdentityAvp, DataReferenceType.LOCATION_INFORMATION);
    udr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
    udr.setRequestedDomain(RequestedDomainType.fromInt(requestedDomain));
    // 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();
}
Also used : ShClientActivity(net.java.slee.resource.diameter.sh.client.ShClientActivity) UserDataRequest(net.java.slee.resource.diameter.sh.events.UserDataRequest) DiameterIdentity(net.java.slee.resource.diameter.base.events.avp.DiameterIdentity) UserIdentityAvp(net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp)

Example 20 with UserIdentityAvp

use of net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp in project jain-slee.diameter by RestComm.

the class HSSClientChildSbb method getPSIActivation.

public String getPSIActivation(String publicIdentity, String destinationRealm, String destinationHost) throws IOException {
    UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
    UserDataRequest udr = diameterShClientMessageFactory.createUserDataRequest(publicIdentityAvp, DataReferenceType.PSI_ACTIVATION);
    udr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
    // 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();
}
Also used : ShClientActivity(net.java.slee.resource.diameter.sh.client.ShClientActivity) UserDataRequest(net.java.slee.resource.diameter.sh.events.UserDataRequest) DiameterIdentity(net.java.slee.resource.diameter.base.events.avp.DiameterIdentity) UserIdentityAvp(net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp)

Aggregations

UserIdentityAvp (net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp)23 DiameterIdentity (net.java.slee.resource.diameter.base.events.avp.DiameterIdentity)17 ShClientActivity (net.java.slee.resource.diameter.sh.client.ShClientActivity)17 UserDataRequest (net.java.slee.resource.diameter.sh.events.UserDataRequest)12 SubscribeNotificationsRequest (net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest)7 Test (org.junit.Test)5 BaseFactoriesTest (org.mobicents.slee.resource.diameter.base.tests.factories.BaseFactoriesTest)5 ProfileUpdateRequest (net.java.slee.resource.diameter.sh.events.ProfileUpdateRequest)4 ApplicationId (org.jdiameter.api.ApplicationId)4 ShServerMessageFactoryImpl (org.mobicents.slee.resource.diameter.sh.server.ShServerMessageFactoryImpl)3 PushNotificationRequest (net.java.slee.resource.diameter.sh.events.PushNotificationRequest)2 ProfileUpdateAnswer (net.java.slee.resource.diameter.sh.events.ProfileUpdateAnswer)1 PushNotificationAnswer (net.java.slee.resource.diameter.sh.events.PushNotificationAnswer)1 SubscribeNotificationsAnswer (net.java.slee.resource.diameter.sh.events.SubscribeNotificationsAnswer)1 UserDataAnswer (net.java.slee.resource.diameter.sh.events.UserDataAnswer)1 IdentitySetType (net.java.slee.resource.diameter.sh.events.avp.IdentitySetType)1 ShClientMessageFactoryImpl (org.mobicents.slee.resource.diameter.sh.client.ShClientMessageFactoryImpl)1