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 ClassesModifier and TypeClassDescriptionstatic classThe Setter for the AMQP fragment. -
Field Summary
Fields inherited from class io.aiven.commons.kafka.config.fragment.ConfigFragment
dataAccess -
Constructor Summary
ConstructorsConstructorDescriptionAmqpFragment(io.aiven.commons.kafka.config.fragment.FragmentDataAccess dataAccess) Construct the ConfigFragment. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.qpid.protonj2.client.ClientCreates a AMQP client.org.apache.qpid.protonj2.client.ConnectiongetConnection(org.apache.qpid.protonj2.client.Client client) Creates a new Connection to an AMQP client.org.apache.qpid.protonj2.client.ReceivergetReceiver(org.apache.qpid.protonj2.client.Connection connection) Creates a new AMQP Receiver.static AmqpFragment.SetterCreates the setter for this fragment.static org.apache.kafka.common.config.ConfigDefupdate(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, getConfiguredInstance, getInt, getList, getLong, getPassword, getString, has, logDeprecated, logDeprecated, logDeprecated, registerIssue, validate, validate, validationMessage, valuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.aiven.kafka.connect.amqp.common.config.AmqpCommonConfig
getReceiver
-
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
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:AmqpCommonConfigCreates a AMQP client. Must be closed when finished.- Specified by:
getClientin interfaceAmqpCommonConfig- 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:AmqpCommonConfigCreates a new Connection to an AMQP client.- Specified by:
getConnectionin interfaceAmqpCommonConfig- 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:AmqpCommonConfigCreates a new AMQP Receiver.- Specified by:
getReceiverin interfaceAmqpCommonConfig- 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.
-