public final class FixedSubscriberChannel extends Object implements org.springframework.messaging.SubscribableChannel, org.springframework.beans.factory.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.
Constructor and Description |
---|
FixedSubscriberChannel() |
FixedSubscriberChannel(org.springframework.messaging.MessageHandler handler) |
Modifier and Type | Method and Description |
---|---|
String |
getComponentName() |
String |
getComponentType() |
boolean |
send(org.springframework.messaging.Message<?> message) |
boolean |
send(org.springframework.messaging.Message<?> message,
long timeout) |
void |
setBeanName(String name) |
boolean |
subscribe(org.springframework.messaging.MessageHandler handler) |
boolean |
unsubscribe(org.springframework.messaging.MessageHandler handler) |
public FixedSubscriberChannel()
public FixedSubscriberChannel(org.springframework.messaging.MessageHandler handler)
public void setBeanName(String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
public boolean send(org.springframework.messaging.Message<?> message)
send
in interface org.springframework.messaging.MessageChannel
public boolean send(org.springframework.messaging.Message<?> message, long timeout)
send
in interface org.springframework.messaging.MessageChannel
public boolean subscribe(org.springframework.messaging.MessageHandler handler)
subscribe
in interface org.springframework.messaging.SubscribableChannel
public boolean unsubscribe(org.springframework.messaging.MessageHandler handler)
unsubscribe
in interface org.springframework.messaging.SubscribableChannel
public String getComponentType()
getComponentType
in interface NamedComponent
public String getComponentName()
getComponentName
in interface NamedComponent