public final class FixedSubscriberChannel extends Object implements SubscribableChannel, BeanNameAware, NamedComponent
SubscribableChannel
for a single final subscriber set up during bean instantiation (unlike
other SubscribableChannel
s where the MessageHandler
is subscribed when the endpoint
is started). This channel does not support interceptors or data types.
Note: Stopping (unsubscribe(MessageHandler)
) the subscribed (MessageHandler
) has no effect.
INDEFINITE_TIMEOUT
Constructor and Description |
---|
FixedSubscriberChannel() |
FixedSubscriberChannel(MessageHandler handler) |
Modifier and Type | Method and Description |
---|---|
String |
getBeanName() |
String |
getComponentName() |
String |
getComponentType() |
boolean |
send(Message<?> message) |
boolean |
send(Message<?> message,
long timeout) |
void |
setBeanName(String name) |
boolean |
subscribe(MessageHandler handler) |
boolean |
unsubscribe(MessageHandler handler) |
public FixedSubscriberChannel()
public FixedSubscriberChannel(MessageHandler handler)
public void setBeanName(String name)
setBeanName
in interface BeanNameAware
public String getBeanName()
getBeanName
in interface NamedComponent
public boolean send(Message<?> message)
send
in interface MessageChannel
public boolean send(Message<?> message, long timeout)
send
in interface MessageChannel
public boolean subscribe(MessageHandler handler)
subscribe
in interface SubscribableChannel
public boolean unsubscribe(MessageHandler handler)
unsubscribe
in interface SubscribableChannel
public String getComponentType()
getComponentType
in interface NamedComponent
public String getComponentName()
getComponentName
in interface NamedComponent