subprojects/parseq-restli-client/src/main/java/com/linkedin/restli/client/ParSeqRestliClientBuilder.java
public ParSeqRestClient build() {

    if (_inboundRequestContextFinder == null) {
      LOGGER.debug("InboundRequestContextFinder not specified, using default one");
    }
    InboundRequestContextFinder inboundRequestContextFinder = _inboundRequestContextFinder == null ?
        () -> Optional.empty() : _inboundRequestContextFinder;

    if (_config != null) {
      LOGGER.debug("One config specified");
      _configs = Collections.singletonMap(DEFAULT_CONFIG, _config);
      _configChooser = (irc, r) -> DEFAULT_CONFIG;
    } else if (_configs == null) {
      throw new IllegalStateException("One type of config has to be specified using either setConfig() or setMultipleConfigs().");
    } else {
      LOGGER.debug("Multiple configs specified");
    }

    RequestConfigProvider configProvider = new MultipleRequestConfigProvider(_configs, _configChooser, inboundRequestContextFinder);
    Function<Request<?>, RequestContext> requestContextProvider = (_requestContextProvider == null) ?
        request -> new RequestContext() :
        _requestContextProvider;

    ParSeqRestClient parseqClient = new ParSeqRestClient(_client, configProvider, requestContextProvider, _d2RequestTimeoutEnabled);
    if (_batchingSupport != null) {
      LOGGER.debug("Found batching support");
      _batchingSupport.registerStrategy(parseqClient);
    } else {
      LOGGER.debug("Did not find batching support");
    }
    return parseqClient;
  }
public ParSeqRestClient build() {

    if (_inboundRequestContextFinder == null) {
      LOGGER.debug("InboundRequestContextFinder not specified, using default one");
    }
    InboundRequestContextFinder inboundRequestContextFinder = _inboundRequestContextFinder == null ?
        () -> Optional.empty() : _inboundRequestContextFinder;

    if (_config != null) {
      LOGGER.debug("One config specified");
      _configs = Collections.singletonMap(DEFAULT_CONFIG, _config);
      _configChooser = (irc, r) -> DEFAULT_CONFIG;
    } else if (_configs == null) {
      throw new IllegalStateException("One type of config has to be specified using either setConfig() or setMultipleConfigs().");
    } else {
      LOGGER.debug("Multiple configs specified");
    }

    RequestConfigProvider configProvider = new MultipleRequestConfigProvider(_configs, _configChooser, inboundRequestContextFinder);
    Function<Request<?>, RequestContext> requestContextProvider = (_requestContextProvider == null) ?
        request -> new RequestContext() :
        _requestContextProvider;

    ParSeqRestClient parseqClient = new ParSeqRestClient(_client, configProvider, requestContextProvider, _d2RequestTimeoutEnabled);
    if (_batchingSupport != null) {
      LOGGER.debug("Found batching support");
      _batchingSupport.registerStrategy(parseqClient);
    } else {
      LOGGER.debug("Did not find batching support");
    }
    return parseqClient;
  }
public ParSeqRestClient build ( ) { if ( _inboundRequestContextFinder == null ) { LOGGER . debug ( "InboundRequestContextFinder not specified, using default one" ) ; } InboundRequestContextFinder inboundRequestContextFinder = _inboundRequestContextFinder == null ? ( ) -> Optional . empty ( ) : _inboundRequestContextFinder ; if ( _config != null ) { LOGGER . debug ( "One config specified" ) ; _configs = Collections . singletonMap ( DEFAULT_CONFIG , _config ) ; _configChooser = ( irc , r ) -> DEFAULT_CONFIG ; } else if ( _configs == null ) { throw new IllegalStateException ( "One type of config has to be specified using either setConfig() or setMultipleConfigs()." ) ; } else { LOGGER . debug ( "Multiple configs specified" ) ; } RequestConfigProvider configProvider = new MultipleRequestConfigProvider ( _configs , _configChooser , inboundRequestContextFinder ) ; Function < Request < ? > , RequestContext > requestContextProvider = ( _requestContextProvider == null ) ? request -> new RequestContext ( ) : _requestContextProvider ; ParSeqRestClient parseqClient = new ParSeqRestClient ( _client , configProvider , requestContextProvider , _d2RequestTimeoutEnabled ) ; if ( _batchingSupport != null ) { LOGGER . debug ( "Found batching support" ) ; _batchingSupport . registerStrategy ( parseqClient ) ; } else { LOGGER . debug ( "Did not find batching support" ) ; } return parseqClient ; }
This method may throw RuntimeException e.g. when there is a problem with configuration.

@throws RuntimeException e.g. when there is a problem with configuration
@return instance of ParSeqRestClient
This method may throw RuntimeException e . g . when there is a problem with configuration .