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 MockPublisher
getPublisher()
java.util.List<PlatformMessage>
getSentMessages()
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.void
start()
Runs the scanner.void
stop()
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 AttivioException
Description copied from interface:TestScannerRunner
Runs the scanner.- Specified by:
start
in interfaceTestScannerRunner
- Throws:
AttivioException
- - if error occurred or the scan was stopped.
-
getSentMessages
public java.util.List<PlatformMessage> getSentMessages() throws AttivioException
- Specified by:
getSentMessages
in 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:
stop
in 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:
setMaxDocs
in interfaceTestScannerRunner
- Parameters:
maxDocs
-
-
-