SMILA 1.0 API documentation

org.eclipse.smila.connectivity.framework
Interface CrawlerController

All Known Implementing Classes:
CrawlerControllerImpl

public interface CrawlerController

Management interface for the CrawlerController.


Field Summary
static java.lang.String PERFORMANCE_AGENT_LOCATION
          The Performance AGENT location.
 
Method Summary
 java.util.Collection<java.lang.String> getAvailableConfigurations()
          returns all available Crawler data source configurations.
 java.util.Collection<java.lang.String> getAvailableCrawlers()
          returns the CrawlerController known Crawlers.
 CrawlerPerformanceCounterHelper<? extends ConnectivityPerformanceAgent> getCrawlerCounterHelper(java.lang.String dataSourceId)
           
 java.util.Map<java.lang.String,CrawlState> getCrawlerTasksState()
          Gets the status of all crawler tasks as a map of data source id and crawler state.
 boolean hasActiveCrawls()
          Checks if there are any active crawls.
 int startCrawl(java.lang.String dataSourceId, java.lang.String jobName)
          Starts a crawl of the given dataSourceId.
 void stopCrawl(java.lang.String dataSourceId)
          Stops an active crawl of the given dataSourceId.
 

Field Detail

PERFORMANCE_AGENT_LOCATION

static final java.lang.String PERFORMANCE_AGENT_LOCATION
The Performance AGENT location.

See Also:
Constant Field Values
Method Detail

startCrawl

int startCrawl(java.lang.String dataSourceId,
               java.lang.String jobName)
               throws ConnectivityException
Starts a crawl of the given dataSourceId. This method creates a new Thread. If it is called for a dataSourceId that is currently crawled a ConnectivityException is thrown. Returns an id for this job, the hashCode of the crawler instance used for performance counter.

Parameters:
dataSourceId - the ID of the data source to crawl
jobName - name of the job to push the crawled content to
Returns:
the crawl import run ID
Throws:
ConnectivityException - if any error occurs

stopCrawl

void stopCrawl(java.lang.String dataSourceId)
               throws ConnectivityException
Stops an active crawl of the given dataSourceId.

Parameters:
dataSourceId - the ID of the data source to stop the crawl
Throws:
ConnectivityException - if any error occurs

hasActiveCrawls

boolean hasActiveCrawls()
                        throws ConnectivityException
Checks if there are any active crawls.

Returns:
true if there are active crawls, false otherwise
Throws:
ConnectivityException - if any error occurs

getCrawlerTasksState

java.util.Map<java.lang.String,CrawlState> getCrawlerTasksState()
Gets the status of all crawler tasks as a map of data source id and crawler state.

Returns:
a map of data source id and crawler state.

getAvailableCrawlers

java.util.Collection<java.lang.String> getAvailableCrawlers()
returns the CrawlerController known Crawlers.

Returns:
Collection with Strings

getAvailableConfigurations

java.util.Collection<java.lang.String> getAvailableConfigurations()
returns all available Crawler data source configurations.

Returns:
List with Strings of all available Crawler data source configurations

getCrawlerCounterHelper

CrawlerPerformanceCounterHelper<? extends ConnectivityPerformanceAgent> getCrawlerCounterHelper(java.lang.String dataSourceId)
Parameters:
dataSourceId -
Returns:
CrawlerPerformanceCounterHelper for the given data source id.

SMILA 1.0 API documentation