use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class AuthClientSessionActivityImpl method sendSessionTerminationRequest.
public void sendSessionTerminationRequest(SessionTerminationRequest request) throws IOException {
try {
// super.sendMessage(request);
DiameterMessageImpl msg = (DiameterMessageImpl) request;
this.clientSession.sendSessionTerminationRequest(new SessionTermRequestImpl(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.getMessage());
}
}
use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class AuthServerSessionActivityImpl method sendAbortSessionRequest.
public void sendAbortSessionRequest(AbortSessionRequest request) throws IOException {
try {
// super.sendMessage(request);
DiameterMessageImpl msg = (DiameterMessageImpl) request;
this.serverSession.sendAbortSessionRequest(new AbortSessionRequestImpl(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.getMessage());
}
}
use of net.java.slee.resource.diameter.base.events.avp.AvpNotAllowedException in project jain-slee.diameter by RestComm.
the class AuthServerSessionActivityImpl method sendReAuthRequest.
public void sendReAuthRequest(ReAuthRequest request) throws IOException {
try {
// super.sendMessage(request);
DiameterMessageImpl msg = (DiameterMessageImpl) request;
this.serverSession.sendReAuthRequest(new ReAuthRequestImpl(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 AuthServerSessionActivityImpl method sendSessionTerminationAnswer.
public void sendSessionTerminationAnswer(SessionTerminationAnswer request) throws IOException {
try {
// super.sendMessage(request);
DiameterMessageImpl msg = (DiameterMessageImpl) request;
this.serverSession.sendSessionTerminationAnswer(new SessionTermAnswerImpl((Answer) 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 DiameterActivityImpl method doSendMessage.
protected Message doSendMessage(DiameterMessage message) {
Message receivedMessage = null;
try {
if (message instanceof DiameterMessageImpl) {
Future<Message> future = this.session.send(((DiameterMessageImpl) message).getGenericData());
receivedMessage = future.get();
} else {
throw new OperationNotSupportedException("Trying to send wrong type of message? [" + message.getClass() + "] \n" + message);
}
} catch (org.jdiameter.api.validation.AvpNotAllowedException e) {
throw new AvpNotAllowedException("Message validation failed.", e, e.getAvpCode(), e.getVendorId());
} catch (Exception e) {
logger.error("Failure sending sync request.", e);
}
return receivedMessage;
}
Aggregations