package com.twjitm.core.test;

import com.twjitm.core.common.service.IService;
import com.twjitm.core.spring.SpringServiceManager;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author twjitm - [Created on 2018-09-20 16:55]
 */
public class TestWorldChatService implements IService {
    @Override
    public String getId() {
        return null;
    }

    @Override
    public void startup() throws Exception {
        ExecutorService executorService=Executors.newCachedThreadPool();
        executorService.execute(new WorldChatTask());

    }

    @Override
    public void shutdown() throws Exception {

    }

    class WorldChatTask implements  Runnable{

        @Override
        public void run() {
            while (true){
                SpringServiceManager.getSpringLoadService().getNettyKafkaProducerListener();
            }
        }
    }
}
