Class TestChannelBinderProvisioner
java.lang.Object
org.springframework.cloud.stream.binder.test.TestChannelBinderProvisioner
- All Implemented Interfaces:
org.springframework.cloud.stream.provisioning.ProvisioningProvider<org.springframework.cloud.stream.binder.ConsumerProperties, org.springframework.cloud.stream.binder.ProducerProperties>
public class TestChannelBinderProvisioner
extends Object
implements org.springframework.cloud.stream.provisioning.ProvisioningProvider<org.springframework.cloud.stream.binder.ConsumerProperties, org.springframework.cloud.stream.binder.ProducerProperties>
ProvisioningProvider to support TestChannelBinder. It exists primarily
to support AbstractMessageChannel semantics for creating
ConsumerDestination and ProducerDestination, to interact with this
Binder.- Author:
- Oleg Zhurakousky
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.cloud.stream.provisioning.ConsumerDestinationprovisionConsumerDestination(String name, String group, org.springframework.cloud.stream.binder.ConsumerProperties properties) Will provision consumer destination as SIDirectChannel.org.springframework.cloud.stream.provisioning.ProducerDestinationprovisionProducerDestination(String name, org.springframework.cloud.stream.binder.ProducerProperties properties) Will provision producer destination as an SIPublishSubscribeChannel.
-
Constructor Details
-
TestChannelBinderProvisioner
public TestChannelBinderProvisioner()
-
-
Method Details
-
provisionProducerDestination
public org.springframework.cloud.stream.provisioning.ProducerDestination provisionProducerDestination(String name, org.springframework.cloud.stream.binder.ProducerProperties properties) throws org.springframework.cloud.stream.provisioning.ProvisioningException Will provision producer destination as an SIPublishSubscribeChannel.
This provides convenience of registering additional subscriber (handler in the test method) along side of being able to callOutputDestination.receive()to get aMessagefor additional assertions.- Specified by:
provisionProducerDestinationin interfaceorg.springframework.cloud.stream.provisioning.ProvisioningProvider<org.springframework.cloud.stream.binder.ConsumerProperties, org.springframework.cloud.stream.binder.ProducerProperties>- Throws:
org.springframework.cloud.stream.provisioning.ProvisioningException
-
provisionConsumerDestination
public org.springframework.cloud.stream.provisioning.ConsumerDestination provisionConsumerDestination(String name, String group, org.springframework.cloud.stream.binder.ConsumerProperties properties) throws org.springframework.cloud.stream.provisioning.ProvisioningException Will provision consumer destination as SIDirectChannel.- Specified by:
provisionConsumerDestinationin interfaceorg.springframework.cloud.stream.provisioning.ProvisioningProvider<org.springframework.cloud.stream.binder.ConsumerProperties, org.springframework.cloud.stream.binder.ProducerProperties>- Throws:
org.springframework.cloud.stream.provisioning.ProvisioningException
-