use of com.cloudhopper.smpp.pdu.Pdu in project load-balancer by RestComm.
the class ClientConnectionHandlerImpl method messageReceived.
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
if (e.getMessage() instanceof Pdu) {
Pdu pdu = (Pdu) e.getMessage();
listener.packetReceived(pdu);
}
}
use of com.cloudhopper.smpp.pdu.Pdu in project load-balancer by RestComm.
the class ServerConnectionImpl method generateEnquireLink.
@Override
public void generateEnquireLink() {
Pdu packet = new EnquireLink();
packet.setSequenceNumber(lastSequenceNumberSent.incrementAndGet());
ChannelBuffer buffer = null;
try {
buffer = transcoder.encode(packet);
} catch (UnrecoverablePduException e) {
logger.error("Encode error: ", e);
} catch (RecoverablePduException e) {
logger.error("Encode error: ", e);
}
if (logger.isDebugEnabled())
logger.debug("LB sent enquire_link request (" + packet + ") to " + channel.getRemoteAddress().toString() + ". session ID : " + sessionId);
channel.write(buffer);
}
use of com.cloudhopper.smpp.pdu.Pdu in project load-balancer by RestComm.
the class MServerConnectionImpl method generateEnquireLink.
@Override
public void generateEnquireLink() {
Pdu packet = new EnquireLink();
packet.setSequenceNumber(lastSequenceNumberSent.incrementAndGet());
ChannelBuffer buffer = null;
try {
buffer = transcoder.encode(packet);
} catch (UnrecoverablePduException e) {
logger.error("Encode error: ", e);
} catch (RecoverablePduException e) {
logger.error("Encode error: ", e);
}
if (logger.isDebugEnabled())
logger.debug("LB sent enquire_link request (" + packet + ") to server " + channel.getRemoteAddress().toString() + ". session ID : " + sessionId);
channel.write(buffer);
}
use of com.cloudhopper.smpp.pdu.Pdu in project load-balancer by RestComm.
the class ClientConnectionImpl method generateEnquireLink.
@Override
public void generateEnquireLink() {
Pdu packet = new EnquireLink();
packet.setSequenceNumber(lastSequenceNumberSent.incrementAndGet());
ChannelBuffer buffer = null;
try {
buffer = transcoder.encode(packet);
} catch (UnrecoverablePduException e) {
logger.error("Encode error: ", e);
} catch (RecoverablePduException e) {
logger.error("Encode error: ", e);
}
isEnquireLinkSent = true;
connectionCheck = new ServerTimerConnectionCheck(this);
// connectionCheckServerSideTimer = monitorExecutor.schedule(connectionCheck,timeoutConnectionCheckServerSide,TimeUnit.MILLISECONDS);
if (logger.isDebugEnabled())
logger.debug("LB sent enquire_link to " + channel.getRemoteAddress().toString() + ". sessionId : " + sessionId);
channel.write(buffer);
}
use of com.cloudhopper.smpp.pdu.Pdu in project load-balancer by RestComm.
the class ServerConnectionHandlerImpl method messageReceived.
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
if (e.getMessage() instanceof Pdu) {
Pdu pdu = (Pdu) e.getMessage();
this.listener.packetReceived(pdu);
}
}
Aggregations