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

com.testingsyndicate.jms.responder.model.RequestInfo Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package com.testingsyndicate.jms.responder.model;

public final class RequestInfo {

    private final String body;
    private final String queueName;
    private final String correlationId;

    private RequestInfo(Builder builder) {
        body = builder.body;
        queueName = builder.queueName;
        correlationId = builder.correlationId;
    }

    public String getBody() {
        return body;
    }

    public String getQueueName() {
        return queueName;
    }

    public String getCorrelationId() {
        return correlationId;
    }

    @Override
    public String toString() {
        return String.format("Request (CorrelationId=%s) (QueueName=%s)",
                correlationId,
                queueName);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public static final class Builder {

        private String body;
        private String queueName;
        private String correlationId;

        private Builder() {
        }

        public Builder withBody(String body) {
            this.body = body;
            return this;
        }

        public Builder withQueueName(String queueName) {
            this.queueName = queueName;
            return this;
        }

        public Builder withCorrelationId(String correlationId) {
            this.correlationId = correlationId;
            return this;
        }

        public RequestInfo build() {
            return new RequestInfo(this);
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy