Class RemoteRepositorySearchBackendImpl
java.lang.Object
org.apache.maven.search.api.support.SearchBackendSupport
org.apache.maven.search.backend.remoterepository.internal.RemoteRepositorySearchBackendImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,SearchBackend,SearchEngine,RemoteRepositorySearchBackend
public class RemoteRepositorySearchBackendImpl
extends SearchBackendSupport
implements RemoteRepositorySearchBackend
Implementation of
RemoteRepositorySearchBackend that is tested against Maven Central.
All the methods are "loosely encapsulated" (are protected) to enable easy override of any
required aspect of this implementation, to suit it against different remote repositories
(HTML parsing) if needed.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final ResponseExtractorprotected static final DateTimeFormatterprotected final TransportFields inherited from class org.apache.maven.search.api.support.SearchBackendSupport
backendId, repositoryId -
Constructor Summary
ConstructorsConstructorDescriptionRemoteRepositorySearchBackendImpl(String backendId, String repositoryId, String baseUri, Transport transport, ResponseExtractor responseExtractor) Creates a customized instance of SMO backend, like an in-house instances of SMO or different IDs. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturns the base "service URI" that is used by this backend.protected static StringreadChecksum(InputStream inputStream) search(SearchRequest searchRequest) Methods inherited from class org.apache.maven.search.api.support.SearchBackendSupport
close, getBackendId, getRepositoryIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.search.api.SearchBackend
getBackendId, getRepositoryId
-
Field Details
-
baseUri
-
transport
-
responseExtractor
-
commonHeaders
-
RFC7231
-
-
Constructor Details
-
RemoteRepositorySearchBackendImpl
public RemoteRepositorySearchBackendImpl(String backendId, String repositoryId, String baseUri, Transport transport, ResponseExtractor responseExtractor) Creates a customized instance of SMO backend, like an in-house instances of SMO or different IDs.
-
-
Method Details
-
discoverVersion
-
getBaseUri
Description copied from interface:RemoteRepositorySearchBackendReturns the base "service URI" that is used by this backend. nevernull.- Specified by:
getBaseUriin interfaceRemoteRepositorySearchBackend
-
search
Description copied from interface:SearchEngine- Specified by:
searchin interfaceRemoteRepositorySearchBackend- Specified by:
searchin interfaceSearchEngine- Throws:
IOException
-
readChecksum
- Throws:
IOException
-