use of com.zx.sms.connect.manager.EndpointEntity in project SMSGate by Lihuanghe.
the class SMPPSessionLoginManager method queryEndpointEntityByMsg.
@Override
protected EndpointEntity queryEndpointEntityByMsg(Object msg) {
if (msg instanceof BaseBind) {
BaseBind message = (BaseBind) msg;
String username = message.getSystemId();
if (entity instanceof SMPPServerEndpointEntity) {
SMPPServerEndpointEntity serverEntity = (SMPPServerEndpointEntity) entity;
if (msg instanceof BindTransmitter) {
EndpointEntity end = serverEntity.getChild(username.trim(), ChannelType.DOWN);
return end;
} else if (msg instanceof BindReceiver) {
EndpointEntity end = serverEntity.getChild(username.trim(), ChannelType.UP);
return end;
} else if (msg instanceof BindTransceiver) {
EndpointEntity end = serverEntity.getChild(username.trim(), ChannelType.DUPLEX);
return end;
}
}
}
return null;
}
use of com.zx.sms.connect.manager.EndpointEntity in project SMSGate by Lihuanghe.
the class SgipServerEndpointConnector method doinitPipeLine.
@Override
protected void doinitPipeLine(ChannelPipeline pipeline) {
super.doinitPipeLine(pipeline);
EndpointEntity entity = getEndpointEntity();
pipeline.addLast(GlobalConstance.IdleCheckerHandlerName, new IdleStateHandler(0, 0, entity.getIdleTimeSec(), TimeUnit.SECONDS));
pipeline.addLast("SgipServerIdleStateHandler", GlobalConstance.sgipidleHandler);
pipeline.addLast(SgipCodecChannelInitializer.pipeName(), new SgipCodecChannelInitializer());
pipeline.addLast("sessionLoginManager", new SgipSessionLoginManager(getEndpointEntity()));
}
use of com.zx.sms.connect.manager.EndpointEntity in project SMSGate by Lihuanghe.
the class SMGPServerEndpointConnector method doinitPipeLine.
@Override
protected void doinitPipeLine(ChannelPipeline pipeline) {
super.doinitPipeLine(pipeline);
EndpointEntity entity = getEndpointEntity();
pipeline.addLast(GlobalConstance.IdleCheckerHandlerName, new IdleStateHandler(0, 0, entity.getIdleTimeSec(), TimeUnit.SECONDS));
pipeline.addLast("SmgpServerIdleStateHandler", GlobalConstance.smgpidleHandler);
// 默认使用3.0协议,用户登陆后再更换为正确的协议
pipeline.addLast(SMGPCodecChannelInitializer.pipeName(), new SMGPCodecChannelInitializer(0x30));
pipeline.addLast("sessionLoginManager", new SMGPSessionLoginManager(getEndpointEntity()));
}
use of com.zx.sms.connect.manager.EndpointEntity in project SMSGate by Lihuanghe.
the class SMPPClientEndpointConnector method doinitPipeLine.
@Override
protected void doinitPipeLine(ChannelPipeline pipeline) {
EndpointEntity entity = getEndpointEntity();
pipeline.addLast(GlobalConstance.IdleCheckerHandlerName, new IdleStateHandler(0, 0, entity.getIdleTimeSec(), TimeUnit.SECONDS));
pipeline.addLast("SmppServerIdleStateHandler", GlobalConstance.smppidleHandler);
pipeline.addLast(SMPPCodecChannelInitializer.pipeName(), new SMPPCodecChannelInitializer());
pipeline.addLast("sessionLoginManager", new SMPPSessionLoginManager(getEndpointEntity()));
}
use of com.zx.sms.connect.manager.EndpointEntity in project SMSGate by Lihuanghe.
the class SMPPServerEndpointConnector method doinitPipeLine.
@Override
protected void doinitPipeLine(ChannelPipeline pipeline) {
super.doinitPipeLine(pipeline);
EndpointEntity entity = getEndpointEntity();
pipeline.addLast(GlobalConstance.IdleCheckerHandlerName, new IdleStateHandler(0, 0, entity.getIdleTimeSec(), TimeUnit.SECONDS));
pipeline.addLast("SmppServerIdleStateHandler", GlobalConstance.smppidleHandler);
pipeline.addLast(SMPPCodecChannelInitializer.pipeName(), new SMPPCodecChannelInitializer());
pipeline.addLast("sessionLoginManager", new SMPPSessionLoginManager(getEndpointEntity()));
}
Aggregations