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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Stringfetch(SearchRequest searchRequest, String serviceUri) This method should issue a HTTP GET requests usingserviceUriand return body payload asStringONLY if the response was HTTP 200 Ok and there was a payload returned by service.protected StringExposes this backend version, for example to be used in HTTPUser-Agentstring, nevernull.protected StringExposes full HTTPUser-Agentstring 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-Agentstring, nevernull. -
getUserAgent
Exposes full HTTPUser-Agentstring ready to be used by HTTP clients, nevernull. -
fetch
This method should issue a HTTP GET requests usingserviceUriand return body payload asStringONLY 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
-