Ignore:
Timestamp:
01/05/22 22:26:59 (2 years ago)
Author:
Oliver Schonefeld
Message:
  • re-factor to make SRUOperation available
  • add experimental support for processing authenticated requests
File:
1 edited

Legend:

Unmodified
Added
Removed
  • SRUClient/trunk/src/main/java/eu/clarin/sru/client/SRUClientConfig.java

    r7194 r7266  
    3939    private final CloseableHttpClient httpClient;
    4040    private final HttpClientContext httpContext;
     41    private final SRURequestAuthenticator requestAuthenticator;
    4142    private final int threadCount;
    4243    private final List<SRURecordDataParser> recordParsers;
     
    8384    public CloseableHttpClient getCustomizedHttpClient() {
    8485        return httpClient;
     86    }
     87
     88
     89    /**
     90     * Get the request authenticator
     91     *
     92     * @return the configured request authenticator or <code>null</code>
     93     */
     94    public SRURequestAuthenticator getRequestAuthenticator() {
     95        return requestAuthenticator;
    8596    }
    8697
     
    142153            this.httpContext = null;
    143154        }
     155        this.requestAuthenticator = builder.requestAuthenticator;
    144156        this.threadCount      = builder.threadCount;
    145157        if (builder.recordParsers != null) {
     
    170182        private CloseableHttpClient httpClient = null;
    171183        private HttpClientContext httpContext = null;
     184        private SRURequestAuthenticator requestAuthenticator;
    172185        private int threadCount =
    173186                Runtime.getRuntime().availableProcessors() * 2;
     
    271284
    272285
     286        public Builder setRequestAuthenticator(
     287                SRURequestAuthenticator requestAuthenticator) {
     288            this.requestAuthenticator = requestAuthenticator;
     289            return this;
     290        }
     291
     292
    273293        /**
    274294         * Set the number of worker threads. This value is only relevant for the
Note: See TracChangeset for help on using the changeset viewer.