use of net.java.slee.resource.diameter.base.events.avp.DiameterIdentity 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();
}
use of net.java.slee.resource.diameter.base.events.avp.DiameterIdentity 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();
}
use of net.java.slee.resource.diameter.base.events.avp.DiameterIdentity in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method getIMSUserState.
public String getIMSUserState(String publicIdentity, String destinationRealm, String destinationHost) throws IOException {
UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
UserDataRequest udr = diameterShClientMessageFactory.createUserDataRequest(publicIdentityAvp, DataReferenceType.IMS_USER_STATE);
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();
}
use of net.java.slee.resource.diameter.base.events.avp.DiameterIdentity in project jain-slee.diameter by RestComm.
the class DiameterGxResourceAdaptor method getConnectedPeers.
public DiameterIdentity[] getConnectedPeers() {
if (this.stack != null) {
try {
// Get the list of peers from the stack
final List<Peer> peers = stack.unwrap(PeerTable.class).getPeerTable();
final DiameterIdentity[] result = new DiameterIdentity[peers.size()];
int i = 0;
// Get each peer from the list and make a DiameterIdentity
for (Peer peer : peers) {
final DiameterIdentity identity = new DiameterIdentity(peer.getUri().toString());
result[i++] = identity;
}
return result;
} catch (Exception e) {
tracer.severe("Failure getting peer list.", e);
}
}
return new DiameterIdentity[0];
}
Aggregations