1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.jumpmind.symmetric.service;
23
24 import java.io.BufferedWriter;
25 import java.io.IOException;
26 import java.io.OutputStream;
27
28 import org.jumpmind.symmetric.extract.DataExtractorContext;
29 import org.jumpmind.symmetric.extract.IExtractorFilter;
30 import org.jumpmind.symmetric.model.Node;
31 import org.jumpmind.symmetric.model.OutgoingBatch;
32 import org.jumpmind.symmetric.model.Trigger;
33 import org.jumpmind.symmetric.transport.IOutgoingTransport;
34
35 public interface IDataExtractorService {
36
37 public void extractConfiguration(Node node, BufferedWriter writer, DataExtractorContext ctx) throws IOException;
38
39 public void extractConfigurationStandalone(Node node, OutputStream out) throws IOException;
40
41 public void extractConfigurationStandalone(Node node, BufferedWriter out) throws IOException;
42
43 public OutgoingBatch extractInitialLoadFor(Node node, Trigger config, BufferedWriter writer);
44
45 public void extractInitialLoadWithinBatchFor(Node node, Trigger trigger, BufferedWriter writer,
46 DataExtractorContext ctx);
47
48 /***
49 * @return true if work was done or false if there was no work to do.
50 */
51 public boolean extract(Node node, IOutgoingTransport transport) throws Exception;
52
53 public boolean extract(Node node, final IExtractListener handler) throws Exception;
54
55 public boolean extractBatchRange(IOutgoingTransport transport, String startBatchId, String endBatchId)
56 throws Exception;
57
58 public boolean extractBatchRange(IExtractListener handler, String startBatchId, String endBatchId) throws Exception;
59
60 public void addExtractorFilter(IExtractorFilter extractorFilter);
61
62 }