com.fluxtion.ext.streaming.api.stream.NodeWrapper Maven / Gradle / Ivy
package com.fluxtion.ext.streaming.api.stream;
import com.fluxtion.api.annotations.OnEvent;
import com.fluxtion.ext.streaming.api.Wrapper;
import lombok.EqualsAndHashCode;
/**
* simple wrapper that wraps any node.
*
* @author V12 Technology Ltd.
* @param
*/
@EqualsAndHashCode(of = {"node"})
public class NodeWrapper implements Wrapper {
private final T node;
private boolean validOnStart;
public NodeWrapper(T node) {
this.node = node;
}
@OnEvent
public boolean onEvent() {
return true;
}
@Override
public T event() {
return node;
}
@Override
public Class eventClass() {
return (Class) node.getClass();
}
@Override
public boolean isValidOnStart() {
return validOnStart;
}
// @Override
public void setValidOnStart(boolean validOnStart) {
this.validOnStart = validOnStart;
}
@Override
public Wrapper validOnStart(boolean validOnStart) {
this.validOnStart = validOnStart;
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy