shz.spring.ws.WsEvent Maven / Gradle / Ivy
package shz.spring.ws;
import org.springframework.context.ApplicationEvent;
import shz.spring.BeanContainer;
import java.time.Clock;
public abstract class WsEvent extends ApplicationEvent {
private static final long serialVersionUID = 8589142410466220517L;
public WsEvent(Object source) {
super(source);
}
public WsEvent(Object source, Clock clock) {
super(source, clock);
}
public abstract String getTag();
public String getKey() {
return null;
}
public abstract T getMessage();
public abstract void setMessage(T message);
public final void publish(T message) {
setMessage(message);
BeanContainer.getContext().publishEvent(this);
}
public final void publish() {
BeanContainer.getContext().publishEvent(this);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy