Search in sources :

Example 6 with SgipBindRequestMessage

use of com.zx.sms.codec.sgip12.msg.SgipBindRequestMessage in project SMSGate by Lihuanghe.

the class SgipSessionLoginManager method queryEndpointEntityByMsg.

@Override
protected EndpointEntity queryEndpointEntityByMsg(Object msg) {
    if (msg instanceof SgipBindRequestMessage) {
        SgipBindRequestMessage message = (SgipBindRequestMessage) msg;
        String username = message.getLoginName();
        if (entity instanceof SgipServerEndpointEntity) {
            SgipServerEndpointEntity serverEntity = (SgipServerEndpointEntity) entity;
            return serverEntity.getChild(username.trim());
        }
    }
    return null;
}
Also used : SgipBindRequestMessage(com.zx.sms.codec.sgip12.msg.SgipBindRequestMessage) SgipServerEndpointEntity(com.zx.sms.connect.manager.sgip.SgipServerEndpointEntity)

Aggregations

SgipBindRequestMessage (com.zx.sms.codec.sgip12.msg.SgipBindRequestMessage)6 SgipEndpointEntity (com.zx.sms.connect.manager.sgip.SgipEndpointEntity)2 SgipBindResponseMessage (com.zx.sms.codec.sgip12.msg.SgipBindResponseMessage)1 SgipServerEndpointEntity (com.zx.sms.connect.manager.sgip.SgipServerEndpointEntity)1 ByteBuf (io.netty.buffer.ByteBuf)1 ChannelFuture (io.netty.channel.ChannelFuture)1 ChannelHandlerContext (io.netty.channel.ChannelHandlerContext)1 Future (io.netty.util.concurrent.Future)1 GenericFutureListener (io.netty.util.concurrent.GenericFutureListener)1