use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class S13ServerSessionImpl method sendMEIdentityCheckAnswer.
public void sendMEIdentityCheckAnswer(MEIdentityCheckAnswer eca) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) eca;
JMEIdentityCheckAnswerImpl answer = new JMEIdentityCheckAnswerImpl((Answer) msg.getGenericData());
try {
appSession.sendMEIdentityCheckAnswer(answer);
} catch (org.jdiameter.api.validation.AvpNotAllowedException anae) {
throw new AvpNotAllowedException(anae.getMessage(), anae.getAvpCode(), anae.getVendorId());
} catch (Exception e) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to send message.", e);
}
throw new IOException(e.getMessage());
}
}
use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class CxDxServerSessionImpl method sendUserAuthorizationAnswer.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diameter.cxdx.CxDxServerSession#sendUserAuthorizationAnswer(net.java.slee.resource.diameter.cxdx.events.UserAuthorizationAnswer)
*/
public void sendUserAuthorizationAnswer(UserAuthorizationAnswer userAuthorizationAnswer) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) userAuthorizationAnswer;
JUserAuthorizationAnswerImpl answer = new JUserAuthorizationAnswerImpl((Answer) msg.getGenericData());
try {
appSession.sendUserAuthorizationAnswer(answer);
} catch (org.jdiameter.api.validation.AvpNotAllowedException anae) {
throw new AvpNotAllowedException(anae.getMessage(), anae.getAvpCode(), anae.getVendorId());
} catch (Exception e) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to send message.", e);
}
throw new IOException(e.getMessage());
}
}
use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class CreditControlClientSessionImpl method sendCreditControlRequest.
/*
* (non-Javadoc)
*
* @seenet.java.slee.resource.diameter.cca.CreditControlClientSession#
* sendCreditControlRequest
* (net.java.slee.resource.diameter.cca.events.CreditControlRequest)
*/
public void sendCreditControlRequest(CreditControlRequest ccr) throws IOException {
// fetchCurrentState(ccr);
DiameterMessageImpl msg = (DiameterMessageImpl) ccr;
validateState(ccr);
try {
session.sendCreditControlRequest(new JCreditControlRequestImpl((Request) msg.getGenericData()));
} catch (org.jdiameter.api.validation.AvpNotAllowedException e) {
throw new AvpNotAllowedException("Message validation failed.", e, e.getAvpCode(), e.getVendorId());
} catch (Exception e) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to send message.", e);
}
throw new IOException("Failed to send message, due to: " + e);
}
}
use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class CreditControlClientSessionImpl method sendUpdateCreditControlRequest.
/*
* (non-Javadoc)
*
* @seenet.java.slee.resource.diameter.cca.CreditControlClientSession#
* sendUpdateCreditControlRequest
* (net.java.slee.resource.diameter.cca.events.CreditControlRequest)
*/
public void sendUpdateCreditControlRequest(CreditControlRequest ccr) throws IOException {
// FIXME: Should this come already in the CCR?
ccr.setCcRequestType(CcRequestType.UPDATE_REQUEST);
validateState(ccr);
DiameterMessageImpl msg = (DiameterMessageImpl) ccr;
try {
session.sendCreditControlRequest(new JCreditControlRequestImpl((Request) msg.getGenericData()));
} catch (org.jdiameter.api.validation.AvpNotAllowedException e) {
throw new AvpNotAllowedException("Message validation failed.", e, e.getAvpCode(), e.getVendorId());
} catch (Exception e) {
throw new IOException("Failed to send message, due to: " + e);
}
}
use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class CxDxClientSessionImpl method sendPushProfileAnswer.
/* (non-Javadoc)
* @see net.java.slee.resource.diameter.cxdx.CxDxClientSession#sendPushProfileAnswer(net.java.slee.resource.diameter.cxdx.events.PushProfileAnswer)
*/
public void sendPushProfileAnswer(PushProfileAnswer pushProfileAnswer) throws IOException {
try {
DiameterMessageImpl msg = (DiameterMessageImpl) pushProfileAnswer;
appSession.sendPushProfileAnswer(new JPushProfileAnswerImpl((Answer) msg.getGenericData()));
} catch (org.jdiameter.api.validation.AvpNotAllowedException anae) {
throw new AvpNotAllowedException(anae.getMessage(), anae.getAvpCode(), anae.getVendorId());
} catch (Exception e) {
throw new IOException(e.getMessage());
}
}
Aggregations