Interface Binder<T,C extends ConsumerProperties,P extends ProducerProperties>
- Type Parameters:
T
- the primary binding type (e.g. MessageChannel).C
- the consumer properties type.P
- the producer properties type.
- All Known Subinterfaces:
ExtendedPropertiesBinder<T,
C, P>
- All Known Implementing Classes:
AbstractBinder
,AbstractMessageChannelBinder
public interface Binder<T,C extends ConsumerProperties,P extends ProducerProperties>
A strategy interface used to bind an app interface to a logical name. The name is
intended to identify a logical consumer or producer of messages. This may be a queue, a
channel adapter, another message channel, a Spring bean, etc.
- Since:
- 1.0
- Author:
- Mark Fisher, David Turanski, Gary Russell, Jennifer Hickey, Ilayaperumal Gopinathan, Marius Bogoevici, Oleg Zhurakousky
-
Method Summary
Modifier and TypeMethodDescriptionbindConsumer
(String name, String group, T inboundBindTarget, C consumerProperties) Bind the target component as a message consumer to the logical entity identified by the name.bindProducer
(String name, T outboundBindTarget, P producerProperties) Bind the target component as a message producer to the logical entity identified by the name.default String
Returns instance identity of this binder.
-
Method Details
-
getBinderIdentity
Returns instance identity of this binder. Individual binders should normally override this method.- Returns:
- instance identity of this binder
-
bindConsumer
Bind the target component as a message consumer to the logical entity identified by the name.- Parameters:
name
- the logical identity of the message sourcegroup
- the consumer group to which this consumer belongs - subscriptions are shared among consumers in the same group (anull
or empty String, must be treated as an anonymous group that doesn't share the subscription with any other consumer)inboundBindTarget
- the app interface to be bound as a consumerconsumerProperties
- the consumer properties- Returns:
- the setup binding
-
bindProducer
Bind the target component as a message producer to the logical entity identified by the name.- Parameters:
name
- the logical identity of the message targetoutboundBindTarget
- the app interface to be bound as a producerproducerProperties
- the producer properties- Returns:
- the setup binding
-