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

com.tvd12.ezymq.activemq.util.EzyActiveConsumerAnnotations Maven / Gradle / Ivy

The newest version!
package com.tvd12.ezymq.activemq.util;

import com.tvd12.ezymq.activemq.annotation.EzyActiveConsumer;
import com.tvd12.ezymq.common.annotation.EzyConsumerAnnotationProperties;

public final class EzyActiveConsumerAnnotations {

    private EzyActiveConsumerAnnotations() {}

    public static EzyConsumerAnnotationProperties getProperties(
        Object messageConsumer
    ) {
        EzyActiveConsumer anno = messageConsumer
            .getClass()
            .getAnnotation(EzyActiveConsumer.class);
        return getProperties(anno);
    }

    public static EzyConsumerAnnotationProperties getProperties(
        EzyActiveConsumer annotation
    ) {
        return new EzyConsumerAnnotationProperties(
            annotation.topic(),
            annotation.command()
        );
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy