org.xwiki.linkchecker.internal
Class ThreadLinkContextDataProvider

java.lang.Object
  extended by org.xwiki.linkchecker.internal.ThreadLinkContextDataProvider
All Implemented Interfaces:
LinkContextDataProvider

@Component
@Named(value="thread")
@Singleton
public class ThreadLinkContextDataProvider
extends Object
implements LinkContextDataProvider

Adds the Current Thread name to the Link context data since it can be useful to diagnose broken links. In XWiki the thread name contains the request URL and thus it makes it easy to reproduce the generated content containing the broken link.

Since:
4.2M3

Constructor Summary
ThreadLinkContextDataProvider()
           
 
Method Summary
 Map<String,Object> getContextData(String linkURL, String contentReference)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadLinkContextDataProvider

public ThreadLinkContextDataProvider()
Method Detail

getContextData

public Map<String,Object> getContextData(String linkURL,
                                         String contentReference)
Specified by:
getContextData in interface LinkContextDataProvider
Parameters:
linkURL - the URL to the link being checked
contentReference - the reference to the source where the link was found
Returns:
the link context data to add to the link information