Interface Source<T>

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
PushSource

@Public @Stable public interface Source<T> extends AutoCloseable
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    open(Map<String,Object> config, SourceContext sourceContext)
    Open connector with configuration.
    Reads the next message from source.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • open

      void open(Map<String,Object> config, SourceContext sourceContext) throws Exception
      Open connector with configuration.
      Parameters:
      config - initialization config
      sourceContext - environment where the source connector is running
      Throws:
      Exception - IO type exceptions when opening a connector
    • read

      Record<T> read() throws Exception
      Reads the next message from source. If source does not have any new messages, this call should block.
      Returns:
      next message from source. The return result should never be null
      Throws:
      Exception