Package eu.clarin.sru.client
Class SRUClient
- java.lang.Object
-
- eu.clarin.sru.client.SRUClient
-
public class SRUClient extends Object
A client to perform SRU operations. The response of a SRU request is wrapped in a SRU response.This client is reusable but not thread-safe: the application may reuse a client object, but it may not be concurrently shared between multiple threads.
-
-
Constructor Summary
Constructors Constructor Description SRUClient(SRUClientConfig config)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SRUExplainResponse
explain(SRUExplainRequest request)
Perform a explain operation.SRUScanResponse
scan(SRUScanRequest request)
Perform a scan operation.SRUSearchRetrieveResponse
searchRetrieve(SRUSearchRetrieveRequest request)
Perform a searchRetrieve operation.
-
-
-
Constructor Detail
-
SRUClient
public SRUClient(SRUClientConfig config)
Constructor.- Parameters:
config
- the configuration to be used for this client.- Throws:
NullPointerException
- if argumentconfig
isnull
IllegalArgumentException
- if an error occurred while registering record data parsers- See Also:
SRUClientConfig
-
-
Method Detail
-
explain
public SRUExplainResponse explain(SRUExplainRequest request) throws SRUClientException
Perform a explain operation.- Parameters:
request
- an instance of aSRUExplainRequest
object- Returns:
- a
SRUExplainResponse
object - Throws:
SRUClientException
- if an unrecoverable error occurredNullPointerException
- if any required argument isnull
-
scan
public SRUScanResponse scan(SRUScanRequest request) throws SRUClientException
Perform a scan operation.- Parameters:
request
- an instance of aSRUScanRequest
object- Returns:
- a
SRUScanResponse
object - Throws:
SRUClientException
- if an unrecoverable error occurredNullPointerException
- if any required argument isnull
-
searchRetrieve
public SRUSearchRetrieveResponse searchRetrieve(SRUSearchRetrieveRequest request) throws SRUClientException
Perform a searchRetrieve operation.- Parameters:
request
- an instance of aSRUSearchRetrieveRequest
object- Returns:
- a
SRUSearchRetrieveRequest
object - Throws:
SRUClientException
- if an unrecoverable error occurredNullPointerException
- if any required argument isnull
-
-