use of net.java.slee.resource.diameter.cca.events.CreditControlRequest in project jain-slee.diameter by RestComm.
the class CreditControlMessageFactoryImpl method createCreditControlRequest.
/*
* (non-Javadoc)
*
* @see net.java.slee.resource.diameter.cca.CreditControlMessageFactory#createCreditControlRequest(java.lang.String)
*/
public CreditControlRequest createCreditControlRequest(String sessionId) throws IllegalArgumentException {
try {
DiameterAvp sessionIdAvp;
sessionIdAvp = creditControlAvpFactory.getBaseFactory().createAvp(0, DiameterAvpCodes.SESSION_ID, sessionId);
CreditControlRequest req = (CreditControlRequest) createCreditControlMessage(null, new DiameterAvp[] { sessionIdAvp });
addOrigin(req);
return req;
} catch (NoSuchAvpException e) {
throw new IllegalArgumentException(e);
}
}
use of net.java.slee.resource.diameter.cca.events.CreditControlRequest in project jain-slee.diameter by RestComm.
the class CreditControlMessageFactoryImpl method createCreditControlRequest.
/*
* (non-Javadoc)
*
* @see net.java.slee.resource.diameter.cca.CreditControlMessageFactory#createCreditControlRequest()
*/
public CreditControlRequest createCreditControlRequest() {
CreditControlRequest req = (CreditControlRequest) createCreditControlMessage(null, new DiameterAvp[0]);
req.setOriginRealm(new DiameterIdentity(stack.getMetaData().getLocalPeer().getRealmName()));
req.setOriginHost(new DiameterIdentity(stack.getMetaData().getLocalPeer().getUri().getFQDN().toString()));
if (session != null) {
req.setSessionId(session.getSessionId());
}
return req;
}
Aggregations