use of com.zx.sms.handler.cmpp.CMPPSubmitLongMessageHandler in project SMSGate by Lihuanghe.
the class CMPPServerChildEndpointConnector method doBindHandler.
@Override
protected void doBindHandler(ChannelPipeline pipe, EndpointEntity cmppentity) {
CMPPEndpointEntity entity = (CMPPEndpointEntity) cmppentity;
// 修改连接空闲时间,使用server.xml里配置的连接空闲时间生效
if (entity instanceof CMPPServerChildEndpointEntity) {
ChannelHandler handler = pipe.get(GlobalConstance.IdleCheckerHandlerName);
if (handler != null) {
pipe.replace(handler, GlobalConstance.IdleCheckerHandlerName, new IdleStateHandler(0, 0, entity.getIdleTimeSec(), TimeUnit.SECONDS));
}
}
// 处理长短信
pipe.addLast("CMPPDeliverLongMessageHandler", new CMPPDeliverLongMessageHandler(entity));
pipe.addLast("CMPPSubmitLongMessageHandler", new CMPPSubmitLongMessageHandler(entity));
pipe.addLast("CmppActiveTestRequestMessageHandler", GlobalConstance.activeTestHandler);
pipe.addLast("CmppActiveTestResponseMessageHandler", GlobalConstance.activeTestRespHandler);
pipe.addLast("CmppTerminateRequestMessageHandler", GlobalConstance.terminateHandler);
pipe.addLast("CmppTerminateResponseMessageHandler", GlobalConstance.terminateRespHandler);
}
use of com.zx.sms.handler.cmpp.CMPPSubmitLongMessageHandler in project SMSGate by Lihuanghe.
the class CMPPClientEndpointConnector method doBindHandler.
@Override
protected void doBindHandler(ChannelPipeline pipe, EndpointEntity cmppentity) {
CMPPEndpointEntity entity = (CMPPEndpointEntity) cmppentity;
if (entity instanceof ClientEndpoint) {
pipe.addAfter(GlobalConstance.codecName, "reWriteSubmitMsgSrcHandler", new ReWriteSubmitMsgSrcHandler(entity));
}
// 处理长短信
pipe.addLast("CMPPDeliverLongMessageHandler", new CMPPDeliverLongMessageHandler(entity));
pipe.addLast("CMPPSubmitLongMessageHandler", new CMPPSubmitLongMessageHandler(entity));
pipe.addLast("CmppActiveTestRequestMessageHandler", GlobalConstance.activeTestHandler);
pipe.addLast("CmppActiveTestResponseMessageHandler", GlobalConstance.activeTestRespHandler);
pipe.addLast("CmppTerminateRequestMessageHandler", GlobalConstance.terminateHandler);
pipe.addLast("CmppTerminateResponseMessageHandler", GlobalConstance.terminateRespHandler);
}
Aggregations