public class PingSitemapTask extends TimerTask implements Component, Initializable, LogEnabled, Serviceable, Disposable
Modifier and Type | Field and Description |
---|---|
private Logger |
_logger |
private SiteManager |
_siteManager |
private Timer |
_timer |
private static String |
BING_URL |
private static String |
EXECUTION_HOUR_PARAMETER |
private static String |
GOOGLE_URL |
private static String |
PING_ACTIVATED_SITE_PARAM |
private static String |
PING_SITEMAP_TIMER_NAME |
static String |
ROLE
Avalon role
|
private static String |
SITEMAP_XML_PATH |
Constructor and Description |
---|
PingSitemapTask() |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
enableLogging(Logger logger) |
private CloseableHttpClient |
getHttpClient() |
private String |
getSitemapUrl(Site site) |
private void |
handleResponse(String uri,
HttpGet pingRrequest,
org.apache.http.HttpResponse response) |
void |
initialize() |
private void |
pingSearchEngine(String searchEngineUrl,
String sitemapUrl) |
void |
run() |
void |
service(ServiceManager manager) |
cancel, scheduledExecutionTime
private static final String EXECUTION_HOUR_PARAMETER
private static final String PING_SITEMAP_TIMER_NAME
private static final String PING_ACTIVATED_SITE_PARAM
private static final String BING_URL
private static final String GOOGLE_URL
private static final String SITEMAP_XML_PATH
private SiteManager _siteManager
public PingSitemapTask()
private CloseableHttpClient getHttpClient()
private String getSitemapUrl(Site site)
private void handleResponse(String uri, HttpGet pingRrequest, org.apache.http.HttpResponse response)
private void pingSearchEngine(String searchEngineUrl, String sitemapUrl) throws Exception
Exception
public void dispose()
dispose
in interface Disposable
public void enableLogging(Logger logger)
enableLogging
in interface LogEnabled
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException