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

com.arextest.schedule.sender.httprequest.HttpRequestBuilderFactory Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package com.arextest.schedule.sender.httprequest;

import com.arextest.schedule.sender.SenderParameters;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
public class HttpRequestBuilderFactory {

  final List httpRequestBuilders;

  public AbstractHttpRequestBuilder getHttpRequestBuilder(SenderParameters senderParameters) {
    for (AbstractHttpRequestBuilder httpRequestBuilder : httpRequestBuilders) {
      if (httpRequestBuilder.supportBuild(senderParameters)) {
        return httpRequestBuilder;
      }
    }
    return null;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy