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

net.n2oapp.framework.config.io.event.StompEventIO Maven / Gradle / Ivy

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

import net.n2oapp.framework.api.metadata.event.N2oStompEvent;
import net.n2oapp.framework.api.metadata.action.N2oAction;
import net.n2oapp.framework.api.metadata.io.IOProcessor;
import net.n2oapp.framework.config.io.action.v2.ActionIOv2;
import org.jdom2.Element;
import org.springframework.stereotype.Component;

/**
 * Чтение\запись STOMP-события
 */
@Component
public class StompEventIO extends AbstractEventIO {

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

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

    @Override
    public void io(Element e, N2oStompEvent m, IOProcessor p) {
        super.io(e, m, p);
        p.attribute(e, "destination", m::getDestination, m::setDestination);
        p.anyChild(e, null, m::getAction, m::setAction, p.anyOf(N2oAction.class), ActionIOv2.NAMESPACE);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy