Class BrokerConnectionProvider
java.lang.Object
com.sap.cds.services.messaging.jms.BrokerConnectionProvider
This class manages the broker connections to the appropriate messaging services. By default there
is only one broker connection of each messaging kind. But if any configuration contains the custom
client configuration a new broker connection is created for the service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidasyncConnectionInitialization(CdsProperties.Messaging.MessagingServiceConfig config, Consumer<BrokerConnection> consumer) Initializes asynchronous the broker connection for the specified messaging service.protected abstract BrokerConnectioncreateBrokerConnection(String name, Map<String, String> clientProperties) Creates the broker connection corresponding the specified client configuration properties.
-
Constructor Details
-
BrokerConnectionProvider
-
-
Method Details
-
asyncConnectionInitialization
public void asyncConnectionInitialization(CdsProperties.Messaging.MessagingServiceConfig config, Consumer<BrokerConnection> consumer) Initializes asynchronous the broker connection for the specified messaging service. Notifies the consumer asynchronously when the broker connection is ready to use.- Parameters:
config- messaging service configurationconsumer- connection consumer
-
createBrokerConnection
protected abstract BrokerConnection createBrokerConnection(String name, Map<String, String> clientProperties) throws ExceptionCreates the broker connection corresponding the specified client configuration properties.- Parameters:
name- connection nameclientProperties- client configuration properties- Returns:
- broker connection
- Throws:
Exception- when the connection cannot be created
-