Search in sources :

Example 21 with DiameterIdentity

use of net.java.slee.resource.diameter.base.events.avp.DiameterIdentity 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();
}
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 22 with DiameterIdentity

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

the class HSSClientChildSbb method updateRepositoryData.

public String updateRepositoryData(String publicIdentity, String data, String destinationRealm, String destinationHost) throws IOException {
    UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
    ProfileUpdateRequest pur = diameterShClientMessageFactory.createProfileUpdateRequest(publicIdentityAvp, DataReferenceType.REPOSITORY_DATA, 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();
}
Also used : ShClientActivity(net.java.slee.resource.diameter.sh.client.ShClientActivity) ProfileUpdateRequest(net.java.slee.resource.diameter.sh.events.ProfileUpdateRequest) DiameterIdentity(net.java.slee.resource.diameter.base.events.avp.DiameterIdentity) UserIdentityAvp(net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp)

Example 23 with DiameterIdentity

use of net.java.slee.resource.diameter.base.events.avp.DiameterIdentity 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 24 with DiameterIdentity

use of net.java.slee.resource.diameter.base.events.avp.DiameterIdentity 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 25 with DiameterIdentity

use of net.java.slee.resource.diameter.base.events.avp.DiameterIdentity 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)

Aggregations

DiameterIdentity (net.java.slee.resource.diameter.base.events.avp.DiameterIdentity)29 ShClientActivity (net.java.slee.resource.diameter.sh.client.ShClientActivity)17 UserIdentityAvp (net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp)17 UserDataRequest (net.java.slee.resource.diameter.sh.events.UserDataRequest)10 InvalidConfigurationException (javax.slee.resource.InvalidConfigurationException)9 SleeEndpoint (javax.slee.resource.SleeEndpoint)9 CreateActivityException (net.java.slee.resource.diameter.base.CreateActivityException)9 AvpDataException (org.jdiameter.api.AvpDataException)9 Peer (org.jdiameter.api.Peer)9 PeerTable (org.jdiameter.api.PeerTable)9 OperationNotSupportedException (javax.naming.OperationNotSupportedException)8 IOException (java.io.IOException)5 SubscribeNotificationsRequest (net.java.slee.resource.diameter.sh.events.SubscribeNotificationsRequest)5 IllegalDiameterStateException (org.jdiameter.api.IllegalDiameterStateException)4 InternalException (org.jdiameter.api.InternalException)4 DiameterAvp (net.java.slee.resource.diameter.base.events.avp.DiameterAvp)2 ProfileUpdateRequest (net.java.slee.resource.diameter.sh.events.ProfileUpdateRequest)2 ArrayList (java.util.ArrayList)1 ActivityContextInterface (javax.slee.ActivityContextInterface)1 CreateException (javax.slee.CreateException)1