Search in sources :

Example 6 with ServerEndpoint

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

the class SessionLoginManager method queryEndpointEntityByMsg.

@Override
protected EndpointEntity queryEndpointEntityByMsg(Object msg) {
    if (msg instanceof CmppConnectRequestMessage) {
        CmppConnectRequestMessage message = (CmppConnectRequestMessage) msg;
        String username = message.getSourceAddr();
        if (entity instanceof ServerEndpoint) {
            ServerEndpoint serverEntity = (ServerEndpoint) entity;
            return serverEntity.getChild(username.trim());
        }
    }
    return null;
}
Also used : CmppConnectRequestMessage(com.zx.sms.codec.cmpp.msg.CmppConnectRequestMessage) ServerEndpoint(com.zx.sms.connect.manager.ServerEndpoint)

Aggregations

ServerEndpoint (com.zx.sms.connect.manager.ServerEndpoint)6 EndpointEntity (com.zx.sms.connect.manager.EndpointEntity)3 CmppConnectRequestMessage (com.zx.sms.codec.cmpp.msg.CmppConnectRequestMessage)1 CmppDeliverRequestMessage (com.zx.sms.codec.cmpp.msg.CmppDeliverRequestMessage)1 CmppSubmitRequestMessage (com.zx.sms.codec.cmpp.msg.CmppSubmitRequestMessage)1 SgipDeliverRequestMessage (com.zx.sms.codec.sgip12.msg.SgipDeliverRequestMessage)1 SgipSubmitRequestMessage (com.zx.sms.codec.sgip12.msg.SgipSubmitRequestMessage)1 SMGPDeliverMessage (com.zx.sms.codec.smgp.msg.SMGPDeliverMessage)1 SMGPSubmitMessage (com.zx.sms.codec.smgp.msg.SMGPSubmitMessage)1 Address (com.zx.sms.codec.smpp.Address)1 DeliverSm (com.zx.sms.codec.smpp.msg.DeliverSm)1 SubmitSm (com.zx.sms.codec.smpp.msg.SubmitSm)1 MsgId (com.zx.sms.common.util.MsgId)1 EndpointConnector (com.zx.sms.connect.manager.EndpointConnector)1 SessionStateManager (com.zx.sms.session.cmpp.SessionStateManager)1 Channel (io.netty.channel.Channel)1