Class AmqpFragment

java.lang.Object
io.aiven.commons.kafka.config.fragment.ConfigFragment
io.aiven.kafka.connect.amqp.common.config.AmqpFragment
All Implemented Interfaces:
io.aiven.commons.kafka.config.fragment.FragmentDataAccess, AmqpCommonConfig

public final class AmqpFragment extends io.aiven.commons.kafka.config.fragment.ConfigFragment implements AmqpCommonConfig
The AMQP Fragment.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The Setter for the AMQP fragment.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The key for the AMQP Message IO format.

    Fields inherited from class io.aiven.commons.kafka.config.fragment.ConfigFragment

    dataAccess
  • Constructor Summary

    Constructors
    Constructor
    Description
    AmqpFragment(io.aiven.commons.kafka.config.fragment.FragmentDataAccess dataAccess)
    Construct the ConfigFragment.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.qpid.protonj2.client.Client
    Creates a AMQP client.
    org.apache.qpid.protonj2.client.Connection
    getConnection(org.apache.qpid.protonj2.client.Client client)
    Creates a new Connection to an AMQP client.
    Gets the expected format for the AMQP message.
    org.apache.qpid.protonj2.client.Receiver
    getReceiver(org.apache.qpid.protonj2.client.Connection connection)
    Creates a new AMQP Receiver.
    org.apache.qpid.protonj2.client.Sender
    getSender(org.apache.qpid.protonj2.client.Connection connection)
    Creates a new AMQP Sender.
    Creates the setter for this fragment.
    static org.apache.kafka.common.config.ConfigDef
    update(org.apache.kafka.common.config.ConfigDef configDef)
    Adds the configuration options for compression to the configuration definition.

    Methods inherited from class io.aiven.commons.kafka.config.fragment.ConfigFragment

    getBoolean, getClass, getConfiguredInstance, getInt, getList, getLong, getPassword, getString, has, logDeprecated, logDeprecated, logDeprecated, registerIssue, validate, validate, validationMessage, values

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.aiven.kafka.connect.amqp.common.config.AmqpCommonConfig

    getReceiver, getSender
  • Field Details

  • Constructor Details

    • AmqpFragment

      public AmqpFragment(io.aiven.commons.kafka.config.fragment.FragmentDataAccess dataAccess)
      Construct the ConfigFragment.
      Parameters:
      dataAccess - the FragmentDataAccess that this fragment is associated with.
  • Method Details

    • update

      public static org.apache.kafka.common.config.ConfigDef update(org.apache.kafka.common.config.ConfigDef configDef)
      Adds the configuration options for compression to the configuration definition.
      Parameters:
      configDef - the Configuration definition.
      Returns:
      the update configuration definition
    • setter

      public static AmqpFragment.Setter setter(Map<String,String> data)
      Creates the setter for this fragment.
      Parameters:
      data - the data to add values to.
      Returns:
      the Setter.
    • getClient

      public org.apache.qpid.protonj2.client.Client getClient()
      Description copied from interface: AmqpCommonConfig
      Creates a AMQP client. Must be closed when finished.
      Specified by:
      getClient in interface AmqpCommonConfig
      Returns:
      a newly constructed client.
    • getConnection

      public org.apache.qpid.protonj2.client.Connection getConnection(org.apache.qpid.protonj2.client.Client client) throws org.apache.qpid.protonj2.client.exceptions.ClientException
      Description copied from interface: AmqpCommonConfig
      Creates a new Connection to an AMQP client.
      Specified by:
      getConnection in interface AmqpCommonConfig
      Parameters:
      client - the client to connect to.
      Returns:
      the Connection. Must be closed when finished.
      Throws:
      org.apache.qpid.protonj2.client.exceptions.ClientException - if the AMQP connection can not be established.
    • getReceiver

      public org.apache.qpid.protonj2.client.Receiver getReceiver(org.apache.qpid.protonj2.client.Connection connection) throws org.apache.qpid.protonj2.client.exceptions.ClientException, ExecutionException, InterruptedException
      Description copied from interface: AmqpCommonConfig
      Creates a new AMQP Receiver.
      Specified by:
      getReceiver in interface AmqpCommonConfig
      Parameters:
      connection - the AMQP connection to use for the receiver.
      Returns:
      the new AMQP Receiver. Must be closed when finished.
      Throws:
      org.apache.qpid.protonj2.client.exceptions.ClientException - if the AMQP receiver can not be created.
      ExecutionException - If the receiver could not be created.
      InterruptedException - If the remote server was interrupted.
    • getSender

      public org.apache.qpid.protonj2.client.Sender getSender(org.apache.qpid.protonj2.client.Connection connection) throws org.apache.qpid.protonj2.client.exceptions.ClientException, ExecutionException, InterruptedException
      Description copied from interface: AmqpCommonConfig
      Creates a new AMQP Sender.
      Specified by:
      getSender in interface AmqpCommonConfig
      Parameters:
      connection - the AMQP connection to use for the sender.
      Returns:
      the new AMQP sender. Must be closed when finished.
      Throws:
      org.apache.qpid.protonj2.client.exceptions.ClientException - if the AMQP sender can not be created.
      ExecutionException - If the sender could not be created.
      InterruptedException - If the remote server was interrupted.
    • getMessageFormat

      public AmqpFormat getMessageFormat()
      Description copied from interface: AmqpCommonConfig
      Gets the expected format for the AMQP message. This is the conversion strategy AMQP and Kafka message formats.
      Specified by:
      getMessageFormat in interface AmqpCommonConfig
      Returns:
      the expected Amqp message format.