use of com.cloudhopper.smpp.pdu.GenericNack in project load-balancer by RestComm.
the class ServerConnectionImpl method sendGenericNack.
/**
*Send generic_nack to client if unable to convert request
*from client
*@param packet PDU packet
*/
private void sendGenericNack(Pdu packet) {
GenericNack genericNack = new GenericNack();
genericNack.setSequenceNumber(packet.getSequenceNumber());
genericNack.setCommandStatus(SmppConstants.STATUS_INVCMDID);
ChannelBuffer buffer = null;
try {
buffer = transcoder.encode(genericNack);
} catch (UnrecoverablePduException e) {
logger.error("Encode error: ", e);
} catch (RecoverablePduException e) {
logger.error("Encode error: ", e);
}
if (logger.isDebugEnabled())
logger.debug("LB sent generic_nack response for packet (" + packet + ") to " + channel.getRemoteAddress().toString() + ". session ID : " + sessionId);
channel.write(buffer);
}
use of com.cloudhopper.smpp.pdu.GenericNack in project load-balancer by RestComm.
the class MServerConnectionImpl method sendGenericNack.
/**
*Send generic_nack to client if unable to convert request
*from client
*@param packet PDU packet
*/
private void sendGenericNack(Pdu packet) {
GenericNack genericNack = new GenericNack();
genericNack.setSequenceNumber(packet.getSequenceNumber());
genericNack.setCommandStatus(SmppConstants.STATUS_INVCMDID);
ChannelBuffer buffer = null;
try {
buffer = transcoder.encode(genericNack);
} catch (UnrecoverablePduException e) {
logger.error("Encode error: ", e);
} catch (RecoverablePduException e) {
logger.error("Encode error: ", e);
}
if (logger.isDebugEnabled())
logger.debug("LB sent generic_nack response for packet (" + packet + ") to server " + channel.getRemoteAddress().toString() + ". session ID : " + sessionId);
channel.write(buffer);
}
Aggregations