Package cz.jiripinkas.jsitemapgenerator
Class Ping.PingBuilder
- java.lang.Object
-
- cz.jiripinkas.jsitemapgenerator.Ping.PingBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pingbuild()Build Ping object.Ping.PingBuilderengines(Ping.SearchEngine... searchEngines)Set up search engines which will be pinged.Ping.PingBuilderhttpClientApacheHttpClient(Object closeableHttpClient)For ping will be used CloseableHttpClient.Ping.PingBuilderhttpClientDefault()For ping will be used build-in OkHttpClient.Ping.PingBuilderhttpClientOkHttp(Object okHttpClient)For ping will be used custom OkHttpClient.Ping.PingBuilderhttpClientRestTemplate(Object restTemplate)For ping will be used custom RestTemplate.Ping.PingBuildersitemapUrl(String sitemapUrl)Set up sitemap url, which can be absolute or relative.
-
-
-
Method Detail
-
engines
public Ping.PingBuilder engines(Ping.SearchEngine... searchEngines)
Set up search engines which will be pinged.- Parameters:
searchEngines- Search engines- Returns:
- PingBuilder
-
sitemapUrl
public Ping.PingBuilder sitemapUrl(String sitemapUrl)
Set up sitemap url, which can be absolute or relative. If you do not call this method, default sitemapUrl will be "sitemap.xml"- Parameters:
sitemapUrl- Sitemap url- Returns:
- PingBuilder
-
httpClientDefault
public Ping.PingBuilder httpClientDefault()
For ping will be used build-in OkHttpClient. Note: You don't have to call this method explicitly, it's default! This mechanism requires this dependency: https://javalibs.com/artifact/com.squareup.okhttp3/okhttp- Returns:
- PingBuilder
-
httpClientOkHttp
public Ping.PingBuilder httpClientOkHttp(Object okHttpClient)
For ping will be used custom OkHttpClient. This mechanism requires this dependency: https://javalibs.com/artifact/com.squareup.okhttp3/okhttp- Parameters:
okHttpClient- Custom OkHttpClient- Returns:
- PingBuilder
-
httpClientRestTemplate
public Ping.PingBuilder httpClientRestTemplate(Object restTemplate)
For ping will be used custom RestTemplate. This mechanism requires this dependency: https://javalibs.com/artifact/org.springframework/spring-web- Parameters:
restTemplate- Custom RestTemplate- Returns:
- PingBuilder
-
httpClientApacheHttpClient
public Ping.PingBuilder httpClientApacheHttpClient(Object closeableHttpClient)
For ping will be used CloseableHttpClient. This mechanism requires this dependency: https://javalibs.com/artifact/org.apache.httpcomponents/httpclient- Parameters:
closeableHttpClient- Custom CloseableHttpClient- Returns:
- PingBuilder
-
build
public Ping build()
Build Ping object. Before call to this method at least one search engine must be set up usingengines(SearchEngine...)method!- Returns:
- Ping
-
-