org.reactivecommons.async.rabbit.config.props.AsyncPropsDomain Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of async-commons-rabbit-starter Show documentation
Show all versions of async-commons-rabbit-starter Show documentation
Abstract your broker with semantic async messages
package org.reactivecommons.async.rabbit.config.props;
import lombok.Getter;
import lombok.Setter;
import org.reactivecommons.async.rabbit.config.RabbitProperties;
import org.reactivecommons.async.starter.props.GenericAsyncPropsDomain;
import org.springframework.beans.factory.annotation.Value;
import java.lang.reflect.Constructor;
@Getter
@Setter
public class AsyncPropsDomain extends GenericAsyncPropsDomain {
public AsyncPropsDomain(@Value("${spring.application.name}") String defaultAppName,
RabbitProperties defaultRabbitProperties,
AsyncRabbitPropsDomainProperties configured,
RabbitSecretFiller secretFiller) {
super(defaultAppName, defaultRabbitProperties, configured, secretFiller, AsyncProps.class,
RabbitProperties.class);
}
@SuppressWarnings("unchecked")
public static AsyncPropsDomainBuilder builder() {
return GenericAsyncPropsDomain.builder(RabbitProperties.class,
AsyncRabbitPropsDomainProperties.class,
(Constructor) AsyncPropsDomain.class.getDeclaredConstructors()[0]);
}
@Override
protected void fillCustoms(AsyncProps asyncProps) {
if (asyncProps.getBrokerConfigProps() == null) {
asyncProps.setBrokerConfigProps(new BrokerConfigProps(asyncProps));
}
}
public interface RabbitSecretFiller extends SecretFiller {
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy