public abstract class AbstractBrokerMessageHandler extends Object implements MessageHandler, org.springframework.context.SmartLifecycle, org.springframework.context.ApplicationEventPublisherAware
MessageHandler that manages subscriptions and
propagates messages to subscribers.| Constructor and Description |
|---|
AbstractBrokerMessageHandler(Collection<String> destinationPrefixes) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkDestinationPrefix(String destination) |
org.springframework.context.ApplicationEventPublisher |
getApplicationEventPublisher() |
Collection<String> |
getDestinationPrefixes() |
int |
getPhase() |
void |
handleMessage(Message<?> message)
Handle the given message.
|
protected abstract void |
handleMessageInternal(Message<?> message) |
boolean |
isAutoStartup() |
boolean |
isRunning() |
protected void |
publishBrokerAvailableEvent() |
protected void |
publishBrokerUnavailableEvent() |
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher) |
void |
setAutoStartup(boolean autoStartup) |
void |
start() |
protected void |
startInternal() |
void |
stop() |
void |
stop(Runnable callback) |
protected void |
stopInternal() |
protected final Log logger
public AbstractBrokerMessageHandler(Collection<String> destinationPrefixes)
public Collection<String> getDestinationPrefixes()
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher)
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAwarepublic org.springframework.context.ApplicationEventPublisher getApplicationEventPublisher()
public void setAutoStartup(boolean autoStartup)
public boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic int getPhase()
getPhase in interface org.springframework.context.Phasedpublic final boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic final void start()
start in interface org.springframework.context.Lifecycleprotected void startInternal()
public final void stop()
stop in interface org.springframework.context.Lifecycleprotected void stopInternal()
public final void stop(Runnable callback)
stop in interface org.springframework.context.SmartLifecyclepublic final void handleMessage(Message<?> message)
MessageHandlerhandleMessage in interface MessageHandlermessage - the message to be handledprotected abstract void handleMessageInternal(Message<?> message)
protected boolean checkDestinationPrefix(String destination)
protected void publishBrokerAvailableEvent()
protected void publishBrokerUnavailableEvent()