Package eu.clarin.sru.client
Class SRUClientConfig
- java.lang.Object
 - 
- eu.clarin.sru.client.SRUClientConfig
 
 
- 
public class SRUClientConfig extends Object
A class for encapsulating the configuration of an SRU client. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSRUClientConfig.BuilderA class that implements the builder pattern to createSRUClientConfiginstances. 
- 
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CONNECT_TIMEOUTdefault connect timeout to be used, if not otherwise specifiedstatic intDEFAULT_SOCKET_TIMEOUTdefault socket timeout to be used, if not otherwise specifiedstatic SRUVersionDEFAULT_SRU_VERSIONdefault version the client will use, if not otherwise specified 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetConnectTimeout()Get the connect timeout.org.apache.http.impl.client.CloseableHttpClientgetCustomizedHttpClient()Get the customized HTTP client which is to be used.SRUVersiongetDefaultVersion()Get default SRU version to be used.List<SRUExtraResponseDataParser>getExtraResponseDataParsers()Get the list of extra response data parsers to be used.org.apache.http.client.protocol.HttpClientContextgetHttpClientContext()Get the HTTP client context which is to be used.List<SRURecordDataParser>getRecordDataParsers()Get the list of record data parsers to be used.SRURequestAuthenticatorgetRequestAuthenticator()Get the request authenticatorintgetSocketTimeout()Get the socket timeout.intgetThreadCount()Get the number of worker threads. 
 - 
 
- 
- 
Field Detail
- 
DEFAULT_SRU_VERSION
public static final SRUVersion DEFAULT_SRU_VERSION
default version the client will use, if not otherwise specified 
- 
DEFAULT_CONNECT_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUT
default connect timeout to be used, if not otherwise specified- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_SOCKET_TIMEOUT
public static final int DEFAULT_SOCKET_TIMEOUT
default socket timeout to be used, if not otherwise specified- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
getDefaultVersion
public SRUVersion getDefaultVersion()
Get default SRU version to be used.- Returns:
 - the default SRU version to be used.
 
 
- 
getConnectTimeout
public int getConnectTimeout()
Get the connect timeout. This value is ignored if a customized HTTP client is provided.- Returns:
 - the connect timeout
 
 
- 
getSocketTimeout
public int getSocketTimeout()
Get the socket timeout. This value is ignored if a customized HTTP client is provided.- Returns:
 - the connect timeout
 
 
- 
getCustomizedHttpClient
public org.apache.http.impl.client.CloseableHttpClient getCustomizedHttpClient()
Get the customized HTTP client which is to be used.- Returns:
 - a configured HTTP client instance or 
null 
 
- 
getRequestAuthenticator
public SRURequestAuthenticator getRequestAuthenticator()
Get the request authenticator- Returns:
 - the configured request authenticator or 
null 
 
- 
getHttpClientContext
public org.apache.http.client.protocol.HttpClientContext getHttpClientContext()
Get the HTTP client context which is to be used. Only relevant, if a customized HTTP client is set, see {getCustomizedHttpClient().- Returns:
 - a HTTP client context instance or 
null 
 
- 
getThreadCount
public int getThreadCount()
Get the number of worker threads. This value is only relevant for theSRUThreadedClient.- Returns:
 - the number of worker threads
 
 
- 
getRecordDataParsers
public List<SRURecordDataParser> getRecordDataParsers()
Get the list of record data parsers to be used.- Returns:
 - the list of record data parsers.
 
 
- 
getExtraResponseDataParsers
public List<SRUExtraResponseDataParser> getExtraResponseDataParsers()
Get the list of extra response data parsers to be used.- Returns:
 - the list of extra response data parsers.
 
 
 - 
 
 -