class JavaToSiddhiSerializer implements Serializer<StratioStreamingMessage, Event> {

    @Override
    public StratioStreamingMessage deserialize(Event object) {
        List<ColumnNameTypeValue> columns = new ArrayList<>();
        for (int i = 0; i < object.getData().length; i++) {
            Object data = object.getData()[i];
            Attribute attribute = streamMetadataService.getAttribute(object.getStreamId(), i);
            columns.add(new ColumnNameTypeValue(attribute.getName(), encodeSiddhiType(attribute.getType()), data));
        }
        return new StratioStreamingMessage(object.getStreamId(), object.getTimeStamp(), columns);
    }

    public  JavaToSiddhiSerializer(StreamMetadataService streamMetadataService);

}