Package org.apache.plc4x.kafka
Class Plc4xSourceTask
- java.lang.Object
-
- org.apache.kafka.connect.source.SourceTask
-
- org.apache.plc4x.kafka.Plc4xSourceTask
-
- All Implemented Interfaces:
org.apache.kafka.connect.connector.Task
public class Plc4xSourceTask extends org.apache.kafka.connect.source.SourceTaskSource Connector Task polling the data source at a given rate. A timer thread is scheduled which sets the fetch flag to true every rate milliseconds. When poll() is invoked, the calling thread waits until the fetch flag is set for WAIT_LIMIT_MILLIS. If the flag does not become true, the method returns null, otherwise a fetch is performed.
-
-
Constructor Summary
Constructors Constructor Description Plc4xSourceTask()
-
-
-
Method Detail
-
version
public String version()
-
start
public void start(Map<String,String> props)
- Specified by:
startin interfaceorg.apache.kafka.connect.connector.Task- Specified by:
startin classorg.apache.kafka.connect.source.SourceTask
-
stop
public void stop()
- Specified by:
stopin interfaceorg.apache.kafka.connect.connector.Task- Specified by:
stopin classorg.apache.kafka.connect.source.SourceTask
-
poll
public List<org.apache.kafka.connect.source.SourceRecord> poll()
- Specified by:
pollin classorg.apache.kafka.connect.source.SourceTask
-
-