Search in sources :

Example 1 with SMPPEndpointEntity

use of com.zx.sms.connect.manager.smpp.SMPPEndpointEntity in project SMSGate by Lihuanghe.

the class SMPPSessionLoginManager method doLogin.

@Override
protected void doLogin(Channel ch) {
    // 发送bind请求
    SMPPEndpointEntity smppentity = (SMPPEndpointEntity) entity;
    BaseBind bind = createBindRequest(smppentity);
    ch.writeAndFlush(bind);
}
Also used : SMPPEndpointEntity(com.zx.sms.connect.manager.smpp.SMPPEndpointEntity) BaseBind(com.zx.sms.codec.smpp.msg.BaseBind)

Example 2 with SMPPEndpointEntity

use of com.zx.sms.connect.manager.smpp.SMPPEndpointEntity in project SMSGate by Lihuanghe.

the class SMPPSessionLoginManager method doLoginSuccess.

@Override
protected void doLoginSuccess(ChannelHandlerContext ctx, EndpointEntity entity, Object message) {
    // 发送bind请求
    SMPPEndpointEntity smppentity = (SMPPEndpointEntity) entity;
    BaseBind bind = (BaseBind) message;
    BaseBindResp resp = (BaseBindResp) bind.createResponse();
    resp.setSystemId(bind.getSystemId());
    ctx.channel().writeAndFlush(resp);
}
Also used : SMPPEndpointEntity(com.zx.sms.connect.manager.smpp.SMPPEndpointEntity) BaseBindResp(com.zx.sms.codec.smpp.msg.BaseBindResp) BaseBind(com.zx.sms.codec.smpp.msg.BaseBind)

Example 3 with SMPPEndpointEntity

use of com.zx.sms.connect.manager.smpp.SMPPEndpointEntity in project SMSGate by Lihuanghe.

the class SMPPSessionLoginManager method validClientMsg.

@Override
protected int validClientMsg(EndpointEntity entity, Object msg) {
    SMPPEndpointEntity smppentity = (SMPPEndpointEntity) entity;
    BaseBind message = (BaseBind) msg;
    if (smppentity.getSystemId().equals(message.getSystemId()) && smppentity.getPassword().equals(message.getPassword())) {
        return 0;
    } else {
        return 3;
    }
}
Also used : SMPPEndpointEntity(com.zx.sms.connect.manager.smpp.SMPPEndpointEntity) BaseBind(com.zx.sms.codec.smpp.msg.BaseBind)

Aggregations

BaseBind (com.zx.sms.codec.smpp.msg.BaseBind)3 SMPPEndpointEntity (com.zx.sms.connect.manager.smpp.SMPPEndpointEntity)3 BaseBindResp (com.zx.sms.codec.smpp.msg.BaseBindResp)1