use of com.zx.sms.session.cmpp.SessionLoginManager in project SMSGate by Lihuanghe.
the class CMPPServerEndpointConnector method doinitPipeLine.
@Override
protected void doinitPipeLine(ChannelPipeline pipeline) {
super.doinitPipeLine(pipeline);
CMPPCodecChannelInitializer codec = null;
if (getEndpointEntity() instanceof CMPPEndpointEntity) {
pipeline.addLast(GlobalConstance.IdleCheckerHandlerName, new IdleStateHandler(0, 0, getEndpointEntity().getIdleTimeSec(), TimeUnit.SECONDS));
codec = new CMPPCodecChannelInitializer(((CMPPEndpointEntity) getEndpointEntity()).getVersion());
} else {
pipeline.addLast(GlobalConstance.IdleCheckerHandlerName, new IdleStateHandler(0, 0, 30, TimeUnit.SECONDS));
codec = new CMPPCodecChannelInitializer();
}
pipeline.addLast("CmppServerIdleStateHandler", GlobalConstance.idleHandler);
pipeline.addLast(codec.pipeName(), codec);
pipeline.addLast("sessionLoginManager", new SessionLoginManager(getEndpointEntity()));
}
use of com.zx.sms.session.cmpp.SessionLoginManager in project SMSGate by Lihuanghe.
the class CMPPClientEndpointConnector method doinitPipeLine.
@Override
protected void doinitPipeLine(ChannelPipeline pipeline) {
CMPPCodecChannelInitializer codec = null;
EndpointEntity entity = getEndpointEntity();
if (entity instanceof CMPPEndpointEntity) {
pipeline.addLast(GlobalConstance.IdleCheckerHandlerName, new IdleStateHandler(0, 0, ((CMPPEndpointEntity) getEndpointEntity()).getIdleTimeSec(), TimeUnit.SECONDS));
codec = new CMPPCodecChannelInitializer(((CMPPEndpointEntity) getEndpointEntity()).getVersion());
} else {
pipeline.addLast(GlobalConstance.IdleCheckerHandlerName, new IdleStateHandler(0, 0, 30, TimeUnit.SECONDS));
codec = new CMPPCodecChannelInitializer();
}
pipeline.addLast("CmppServerIdleStateHandler", GlobalConstance.idleHandler);
pipeline.addLast(codec.pipeName(), codec);
pipeline.addLast("sessionLoginManager", new SessionLoginManager(getEndpointEntity()));
}
Aggregations