SMILA (incubation) 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> getActiveCrawls()
          Returns a Collection of Strings containing the dataSourceIds of the currently active crawls.
 java.util.Collection<java.lang.String> getAvailableCrawlers()
          returns the CrawlerController known Crawlers.
 CrawlState getState(java.lang.String dataSourceId)
          Returns the CrawlState of the crawl with the given dataSourceId.
 boolean hasActiveCrawls()
          Checks if there are any active crawls.
 int startCrawl(java.lang.String dataSourceId)
          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)
               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 the hashCode of the crawler instance used for performance counter.

Parameters:
dataSourceId - the ID of the data source to crawl
Returns:
- the hashcode of the crawler instance as int value
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

getActiveCrawls

java.util.Collection<java.lang.String> getActiveCrawls()
                                                       throws ConnectivityException
Returns a Collection of Strings containing the dataSourceIds of the currently active crawls.

Returns:
a Collection of Strings containing the dataSourceIds
Throws:
ConnectivityException - if any error occurs

getState

CrawlState getState(java.lang.String dataSourceId)
                    throws ConnectivityException
Returns the CrawlState of the crawl with the given dataSourceId.

Parameters:
dataSourceId - the ID of the data source to get the state
Returns:
the CrawlState
Throws:
ConnectivityException - if any error occurs

getAvailableCrawlers

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

Returns:
Collection with Strings

SMILA (incubation) API documentation