1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.search.backend.smo;
20
21 import org.apache.maven.search.api.transport.Java11HttpClientTransport;
22 import org.apache.maven.search.api.transport.Transport;
23 import org.apache.maven.search.backend.smo.internal.SmoSearchBackendImpl;
24
25
26
27
28 public final class SmoSearchBackendFactory {
29 public static final String DEFAULT_BACKEND_ID = "central-smo";
30
31 public static final String DEFAULT_REPOSITORY_ID = "central";
32
33 public static final String DEFAULT_SMO_URI = "https://search.maven.org/solrsearch/select";
34
35 private SmoSearchBackendFactory() {}
36
37
38
39
40 public static SmoSearchBackend createDefault() {
41 return create(DEFAULT_BACKEND_ID, DEFAULT_REPOSITORY_ID, DEFAULT_SMO_URI, new Java11HttpClientTransport());
42 }
43
44
45
46
47 public static SmoSearchBackend create(String backendId, String repositoryId, String smoUri, Transport transport) {
48 return new SmoSearchBackendImpl(backendId, repositoryId, smoUri, transport);
49 }
50 }