Search in sources :

Example 1 with SgipServerEndpointEntity

use of com.zx.sms.connect.manager.sgip.SgipServerEndpointEntity 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)1 SgipServerEndpointEntity (com.zx.sms.connect.manager.sgip.SgipServerEndpointEntity)1