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

com.tvd12.ezymq.rabbitmq.endpoint.EzyRabbitEndpoint Maven / Gradle / Ivy

The newest version!
package com.tvd12.ezymq.rabbitmq.endpoint;

import com.rabbitmq.client.Channel;
import com.tvd12.ezyfox.builder.EzyBuilder;
import com.tvd12.ezyfox.util.EzyCloseable;
import com.tvd12.ezyfox.util.EzyLoggable;

public class EzyRabbitEndpoint
    extends EzyLoggable
    implements EzyCloseable {

    protected final Channel channel;
    protected final String exchange;

    public EzyRabbitEndpoint(Channel channel, String exchange) {
        this.channel = channel;
        this.exchange = exchange;
    }

    @Override
    public void close() {}

    @SuppressWarnings("unchecked")
    public abstract static class Builder>
        implements EzyBuilder {

        protected Channel channel;
        protected String exchange;

        public B channel(Channel channel) {
            this.channel = channel;
            return (B) this;
        }

        public B exchange(String exchange) {
            this.exchange = exchange;
            return (B) this;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy