use of com.zx.sms.codec.smpp.msg.BaseBind 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;
}
Aggregations