com.oath.micro.server.events.RequestsBeingExecuted Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of micro-events Show documentation
Show all versions of micro-events Show documentation
Opinionated rest microservices
package com.oath.micro.server.events;
import java.util.Map;
import org.springframework.beans.factory.annotation.Qualifier;
import com.oath.micro.server.events.RequestTypes.RequestData;
import com.google.common.eventbus.EventBus;
import lombok.Getter;
public class RequestsBeingExecuted {
private final EventBus bus;
final ActiveEvents> events = new ActiveEvents<>();
@Getter
private final String type;
public RequestsBeingExecuted(@Qualifier("microserverEventBus") EventBus bus) {
this.bus = bus;
this.type = "default";
}
public RequestsBeingExecuted(EventBus bus, String type) {
this.bus = bus;
this.type = type;
bus.register(this);
}
public int events() {
return events.events();
}
public int size() {
return events.size();
}
@Override
public String toString() {
return events.toString();
}
Map toMap() {
return events.toMap();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy