io.quarkus.websockets.next.deployment.GlobalErrorHandlersBuildItem Maven / Gradle / Ivy
package io.quarkus.websockets.next.deployment;
import java.util.List;
import io.quarkus.builder.item.SimpleBuildItem;
import io.quarkus.websockets.next.deployment.Callback.Target;
import io.quarkus.websockets.next.deployment.WebSocketProcessor.GlobalErrorHandler;
final class GlobalErrorHandlersBuildItem extends SimpleBuildItem {
final List handlers;
GlobalErrorHandlersBuildItem(List handlers) {
this.handlers = handlers;
}
List forServer() {
return handlers.stream().filter(h -> h.callback().isServer() || h.callback().target == Target.UNDEFINED).toList();
}
List forClient() {
return handlers.stream().filter(h -> h.callback().isClient() || h.callback().target == Target.UNDEFINED).toList();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy