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

io.bitsensor.plugins.java.blocking.BlockingEvent Maven / Gradle / Ivy

The newest version!
package io.bitsensor.plugins.java.blocking;

import io.bitsensor.plugins.shaded.org.springframework.context.ApplicationEvent;

public class BlockingEvent extends ApplicationEvent {

    private Type type;
    private transient Object message;

    public BlockingEvent(Object source, Type type, Object message) {
        super(source);
        this.type = type;
        this.message = message;
    }

    public Type getType() {
        return type;
    }

    public Object getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "BlockingEvent{" +
                "type='" + type.value() + "\'}";
    }

    public enum Type {
        ADD("add"),
        DELETE("delete"),
        UPDATE("update"),
        FETCH("fetch");

        private final String value;

        Type(String s) {
            value = s;
        }

        public String value() {
            return value;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy