Interface AmqpCommonConfig
- All Known Implementing Classes:
AmqpFragment,AmqpSinkConfig,AmqpSourceConfig
public interface AmqpCommonConfig
The methods that must be implemented by both source and sink.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.qpid.protonj2.client.ClientCreates a AMQP client.static EncoderDecoderCreates the common converter with AMQP, UniqueType, Kafka, and Collection converters.org.apache.qpid.protonj2.client.ConnectiongetConnection(org.apache.qpid.protonj2.client.Client client) Creates a new Connection to an AMQP client.Gets the expected format for the AMQP message.default org.apache.qpid.protonj2.client.ReceiverCreates a new AMQP Receiver by creating and using a Client and Connection.org.apache.qpid.protonj2.client.ReceivergetReceiver(org.apache.qpid.protonj2.client.Connection connection) Creates a new AMQP Receiver.default org.apache.qpid.protonj2.client.SenderCreates a new AMQP Sender by creating and using a Client and Connection.org.apache.qpid.protonj2.client.SendergetSender(org.apache.qpid.protonj2.client.Connection connection) Creates a new AMQP Sender.
-
Method Details
-
getClient
org.apache.qpid.protonj2.client.Client getClient()Creates a AMQP client. Must be closed when finished.- Returns:
- a newly constructed client.
-
getConnection
org.apache.qpid.protonj2.client.Connection getConnection(org.apache.qpid.protonj2.client.Client client) throws org.apache.qpid.protonj2.client.exceptions.ClientException Creates a new Connection to an AMQP client.- 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
org.apache.qpid.protonj2.client.Receiver getReceiver(org.apache.qpid.protonj2.client.Connection connection) throws org.apache.qpid.protonj2.client.exceptions.ClientException, ExecutionException, InterruptedException Creates a new AMQP Receiver.- 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.
-
getReceiver
default org.apache.qpid.protonj2.client.Receiver getReceiver() throws org.apache.qpid.protonj2.client.exceptions.ClientException, ExecutionException, InterruptedExceptionCreates a new AMQP Receiver by creating and using a Client and Connection.- 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
org.apache.qpid.protonj2.client.Sender getSender(org.apache.qpid.protonj2.client.Connection connection) throws org.apache.qpid.protonj2.client.exceptions.ClientException, ExecutionException, InterruptedException Creates a new AMQP Sender.- 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.
-
getSender
default org.apache.qpid.protonj2.client.Sender getSender() throws org.apache.qpid.protonj2.client.exceptions.ClientException, ExecutionException, InterruptedExceptionCreates a new AMQP Sender by creating and using a Client and Connection.- 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
AmqpFormat getMessageFormat()Gets the expected format for the AMQP message. This is the conversion strategy AMQP and Kafka message formats.- Returns:
- the expected Amqp message format.
-
getCommonConverter
Creates the common converter with AMQP, UniqueType, Kafka, and Collection converters.- Returns:
- the common converter with AMQP, UniqueType, Kafka, and Collection converters.
-