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

com.tvd12.ezymq.mosquitto.util.EzyMosquittoConsumerAnnotations Maven / Gradle / Ivy

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

import com.tvd12.ezymq.common.annotation.EzyConsumerAnnotationProperties;
import com.tvd12.ezymq.mosquitto.annotation.EzyMosquittoConsumer;

public final class EzyMosquittoConsumerAnnotations {

    private EzyMosquittoConsumerAnnotations() {}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy