Search in sources :

Example 1 with ShClientActivity

use of net.java.slee.resource.diameter.sh.client.ShClientActivity in project jain-slee.diameter by RestComm.

the class HSSClientChildSbb method getChargingInformation.

public String getChargingInformation(String publicIdentity, byte[] msisdn, String destinationRealm, String destinationHost) throws IOException {
    UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, msisdn);
    UserDataRequest udr = diameterShClientMessageFactory.createUserDataRequest(publicIdentityAvp, DataReferenceType.CHARGING_INFORMATION);
    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 2 with ShClientActivity

use of net.java.slee.resource.diameter.sh.client.ShClientActivity in project jain-slee.diameter by RestComm.

the class HSSClientChildSbb method subscribeIMSUserState.

public String subscribeIMSUserState(String publicIdentity, int subscriptionRequestType, String destinationRealm, String destinationHost) throws IOException {
    UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
    SubscribeNotificationsRequest snr = diameterShClientMessageFactory.createSubscribeNotificationsRequest(publicIdentityAvp, DataReferenceType.IMS_USER_STATE, 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();
}
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 3 with ShClientActivity

use of net.java.slee.resource.diameter.sh.client.ShClientActivity in project jain-slee.diameter by RestComm.

the class HSSClientChildSbb method getSCSCFName.

public String getSCSCFName(String publicIdentity, String destinationRealm, String destinationHost) throws IOException {
    UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
    UserDataRequest udr = diameterShClientMessageFactory.createUserDataRequest(publicIdentityAvp, DataReferenceType.S_CSCFNAME);
    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 4 with ShClientActivity

use of net.java.slee.resource.diameter.sh.client.ShClientActivity in project jain-slee.diameter by RestComm.

the class HSSClientChildSbb method getUserState.

public String getUserState(byte[] msisdn, int requestedDomain, String destinationRealm, String destinationHost) throws IOException {
    UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(null, msisdn);
    UserDataRequest udr = diameterShClientMessageFactory.createUserDataRequest(publicIdentityAvp, DataReferenceType.USER_STATE);
    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 5 with ShClientActivity

use of net.java.slee.resource.diameter.sh.client.ShClientActivity 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();
}
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)

Aggregations

ShClientActivity (net.java.slee.resource.diameter.sh.client.ShClientActivity)18 DiameterIdentity (net.java.slee.resource.diameter.base.events.avp.DiameterIdentity)17 UserIdentityAvp (net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp)17 UserDataRequest (net.java.slee.resource.diameter.sh.events.UserDataRequest)10 SubscribeNotificationsRequest (net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest)5 ProfileUpdateRequest (net.java.slee.resource.diameter.sh.events.ProfileUpdateRequest)2 IOException (java.io.IOException)1 NamingException (javax.naming.NamingException)1 ActivityContextInterface (javax.slee.ActivityContextInterface)1 CreateException (javax.slee.CreateException)1 IdentitySetType (net.java.slee.resource.diameter.sh.events.avp.IdentitySetType)1