use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class ShClientMessageFactoryImpl method createMessage.
protected Message createMessage(DiameterHeader header, DiameterAvp[] avps, int commandCode) throws AvpNotAllowedException {
try {
Message msg = createRawMessage(header, commandCode);
AvpSet set = msg.getAvps();
for (DiameterAvp avp : avps) {
addAvp(avp, set);
}
return msg;
} catch (Exception e) {
logger.error("Unexpected failure trying to create Sh Message.", e);
}
return null;
}
use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class S6aClientSessionImpl method sendDeleteSubscriberDataAnswer.
public void sendDeleteSubscriberDataAnswer(DeleteSubscriberDataAnswer dsa) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) dsa;
JDeleteSubscriberDataAnswerImpl request = new JDeleteSubscriberDataAnswerImpl((Answer) msg.getGenericData());
try {
appSession.sendDeleteSubscriberDataAnswer(request);
} 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 S6aClientSessionImpl method sendInsertSubscriberDataAnswer.
public void sendInsertSubscriberDataAnswer(InsertSubscriberDataAnswer ida) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) ida;
JInsertSubscriberDataAnswerImpl request = new JInsertSubscriberDataAnswerImpl((Answer) msg.getGenericData());
try {
appSession.sendInsertSubscriberDataAnswer(request);
} 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 S6aClientSessionImpl method sendUpdateLocationRequest.
public void sendUpdateLocationRequest(UpdateLocationRequest ulr) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) ulr;
JUpdateLocationRequestImpl answer = new JUpdateLocationRequestImpl((Request) msg.getGenericData());
try {
appSession.sendUpdateLocationRequest(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 S6aClientSessionImpl method sendCancelLocationAnswer.
public void sendCancelLocationAnswer(CancelLocationAnswer cla) throws IOException {
DiameterMessageImpl msg = (DiameterMessageImpl) cla;
JCancelLocationAnswerImpl request = new JCancelLocationAnswerImpl((Answer) msg.getGenericData());
try {
appSession.sendCancelLocationAnswer(request);
} 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());
}
}
Aggregations