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 SRUExplainResponseexplain(SRUExplainRequest request)Perform a explain operation.SRUScanResponsescan(SRUScanRequest request)Perform a scan operation.SRUSearchRetrieveResponsesearchRetrieve(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 argumentconfigisnullIllegalArgumentException- 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 aSRUExplainRequestobject- Returns:
- a
SRUExplainResponseobject - 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 aSRUScanRequestobject- Returns:
- a
SRUScanResponseobject - 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 aSRUSearchRetrieveRequestobject- Returns:
- a
SRUSearchRetrieveRequestobject - Throws:
SRUClientException- if an unrecoverable error occurredNullPointerException- if any required argument isnull
-
-