package com.gyee.wisdom.test;

import com.gyee.wisdom.common.data.timeseries.TsData;
import org.springframework.messaging.simp.stomp.StompFrameHandler;
import org.springframework.messaging.simp.stomp.StompHeaders;

import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;


public class ClientStompFrameHandler implements StompFrameHandler {

    public Type getPayloadType(StompHeaders headers) {
        Map<String, TsData> map = new HashMap<>();
        return map.getClass();
    }


    public void handleFrame(StompHeaders headers, Object payload) {
        System.out.println("回调数据");
        Map<String, TsData> map = (Map<String, TsData>) payload;
        System.out.println(payload.toString());

    }
}
