Package com.attivio.sdk.scanner
Class TestScannerRunnerImpl
- java.lang.Object
-
- com.attivio.sdk.scanner.TestScannerRunnerImpl
-
- All Implemented Interfaces:
TestScannerRunner
public class TestScannerRunnerImpl extends java.lang.Object implements TestScannerRunner
-
-
Constructor Summary
Constructors Constructor Description TestScannerRunnerImpl(java.lang.String connectorName, DataSourceScanner scanner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MockPublishergetPublisher()java.util.List<PlatformMessage>getSentMessages()voidsetMaxDocs(long maxDocs)Should be set before calling start to test that the scanner doen't publish more documents than directed by the publisher.voidstart()Runs the scanner.voidstop()Test the stopping of the scanner.
-
-
-
Constructor Detail
-
TestScannerRunnerImpl
public TestScannerRunnerImpl(java.lang.String connectorName, DataSourceScanner scanner)
-
-
Method Detail
-
getPublisher
public MockPublisher getPublisher()
-
start
public void start() throws AttivioExceptionDescription copied from interface:TestScannerRunnerRuns the scanner.- Specified by:
startin interfaceTestScannerRunner- Throws:
AttivioException- - if error occurred or the scan was stopped.
-
getSentMessages
public java.util.List<PlatformMessage> getSentMessages() throws AttivioException
- Specified by:
getSentMessagesin interfaceTestScannerRunner- Returns:
- the documents and other messages sent from the publisher.
- Throws:
AttivioException
-
stop
public void stop()
Test the stopping of the scanner. Should be called from a thread different from the one which called the start method.- Specified by:
stopin interfaceTestScannerRunner
-
setMaxDocs
public void setMaxDocs(long maxDocs)
Should be set before calling start to test that the scanner doen't publish more documents than directed by the publisher.- Specified by:
setMaxDocsin interfaceTestScannerRunner- Parameters:
maxDocs-
-
-