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

org.iris_events.asyncapi.parsers.ConsumerPerInstanceParser Maven / Gradle / Ivy

There is a newer version: 6.1.8
Show newest version
package org.iris_events.asyncapi.parsers;

import org.iris_events.annotations.MessageHandler;
import org.jboss.jandex.AnnotationInstance;
import org.jboss.jandex.IndexView;

@SuppressWarnings("unused")
public class ConsumerPerInstanceParser {

    private static final String MESSAGE_HANDLER_CONSUMER_PER_INSTANCE_PARAM = "perInstance";

    public static boolean getFromAnnotationClass(MessageHandler messageHandlerAnnotation) {
        return messageHandlerAnnotation.perInstance();
    }

    public static boolean getFromAnnotationInstance(AnnotationInstance annotation, IndexView index) {
        return annotation.valueWithDefault(index, MESSAGE_HANDLER_CONSUMER_PER_INSTANCE_PARAM).asBoolean();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy