package com.gyee.frame.common.udp.service.impl;


import com.gyee.frame.common.udp.client.UdpSimpleClient;
import com.gyee.frame.common.udp.service.BusinessService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * BusinessServiceImpl
 *
 * @author wliduo[i@dolyw.com]
 * @date 2020/5/20 11:59
 */
@Service
public class BusinessServiceImpl implements BusinessService {

    private static final Logger logger = LoggerFactory.getLogger(BusinessServiceImpl.class);
    @Autowired
    private UdpSimpleClient udpSimpleClient;
    @Override
   // @Async("threadPoolTaskExecutor")
    public void udpHandleMethod(String message) throws Exception {
        logger.info("业务开始处理");
        System.out.println(message);



        udpSimpleClient.sendMessage("中文测试！");
        Thread.sleep(1000);
        logger.info("业务处理完成");
    }
}
