All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.n2oapp.framework.config.io.datasource.StompDatasourceIO Maven / Gradle / Ivy

There is a newer version: 7.28.2
Show newest version
package net.n2oapp.framework.config.io.datasource;

import net.n2oapp.framework.api.metadata.application.N2oStompDatasource;
import net.n2oapp.framework.api.metadata.io.IOProcessor;
import org.jdom2.Element;
import org.springframework.stereotype.Component;

/**
 * Чтение\запись STOMP-источника данных
 */
@Component
public class StompDatasourceIO extends AbstractDatasourceIO {

    @Override
    public Class getElementClass() {
        return N2oStompDatasource.class;
    }

    @Override
    public String getElementName() {
        return "stomp-datasource";
    }

    @Override
    public void io(Element e, N2oStompDatasource ds, IOProcessor p) {
        super.io(e, ds, p);
        p.attribute(e, "destination", ds::getDestination, ds::setDestination);
        p.childrenAttributesToMap(e, "values", "value", ds::getValues, ds::setValues);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy