Class SmoSearchTransportSupport
java.lang.Object
org.apache.maven.search.backend.smo.internal.SmoSearchTransportSupport
- Direct Known Subclasses:
UrlConnectionSmoSearchTransport
A trivial "transport abstraction" to make possible pluggable implementations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
This method should issue a HTTP GET requests usingserviceUri
and return body payload asString
ONLY if the response was HTTP 200 Ok and there was a payload returned by service.protected String
Exposes this backend version, for example to be used in HTTPUser-Agent
string, nevernull
.protected String
Exposes full HTTPUser-Agent
string ready to be used by HTTP clients, nevernull
.
-
Constructor Details
-
SmoSearchTransportSupport
public SmoSearchTransportSupport()
-
-
Method Details
-
getClientVersion
Exposes this backend version, for example to be used in HTTPUser-Agent
string, nevernull
. -
getUserAgent
Exposes full HTTPUser-Agent
string ready to be used by HTTP clients, nevernull
. -
fetch
public abstract String fetch(org.apache.maven.search.SearchRequest searchRequest, String serviceUri) throws IOException This method should issue a HTTP GET requests usingserviceUri
and return body payload asString
ONLY if the response was HTTP 200 Ok and there was a payload returned by service. In any other case, it should throw, never returnnull
. The payload is expected to beapplication/json
, so client may add headers to request. Also, the payload is expected to be "relatively small".- Throws:
IOException
-