package com.xcong.excoin.netty.logic.impl;
|
|
import com.xcong.excoin.netty.bean.RequestBean;
|
import com.xcong.excoin.netty.common.Contans;
|
import com.xcong.excoin.netty.logic.MsgLogic;
|
import com.xcong.excoin.netty.logic.WebSocketLogic;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Component;
|
|
|
/**
|
* @author wzy
|
* @date 2019-05-09
|
*/
|
@Component
|
public class MsgLogicImpl implements MsgLogic {
|
|
@Autowired
|
private WebSocketLogic webSocketLogic;
|
|
@Override
|
public void webSocketMsgLogic(RequestBean requestBean) {
|
switch (requestBean.getType()) {
|
case Contans.WEB_REQ_CONNECTION :
|
webSocketLogic.webReqConnection(requestBean);
|
break;
|
case Contans.HOME_SYMBOLS:
|
webSocketLogic.reqHomeSymbols(requestBean);
|
default:
|
webSocketLogic.defaultReq(requestBean);
|
break;
|
}
|
}
|
|
|
}
|