Class JmsChannelModelProcessor
java.lang.Object
org.flowable.eventregistry.spring.jms.JmsChannelModelProcessor
- All Implemented Interfaces:
EventListener
,ChannelModelProcessor
,Aware
,BeanFactoryAware
,ApplicationContextAware
,ApplicationListener<ContextRefreshedEvent>
public class JmsChannelModelProcessor
extends Object
implements BeanFactoryAware, ApplicationContextAware, ApplicationListener<ContextRefreshedEvent>, ChannelModelProcessor
- Author:
- Filip Hrisafov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ApplicationContext
protected BeanFactory
static final String
protected JmsListenerContainerFactory<?>
protected String
protected boolean
protected StringValueResolver
protected JmsListenerEndpointRegistry
protected JmsOperations
protected final org.slf4j.Logger
protected com.fasterxml.jackson.databind.ObjectMapper
-
Constructor Summary
ConstructorsConstructorDescriptionJmsChannelModelProcessor
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canProcess
(ChannelModel channelModel) boolean
canProcessIfChannelModelAlreadyRegistered
(ChannelModel channelModel) protected JmsListenerEndpoint
createJmsListenerEndpoint
(JmsInboundChannelModel jmsChannelModel, String tenantId, EventRegistry eventRegistry) protected jakarta.jms.MessageListener
createMessageListener
(EventRegistry eventRegistry, InboundChannelModel inboundChannelModel) protected OutboundEventChannelAdapter
createOutboundEventChannelAdapter
(JmsOutboundChannelModel channelModel) protected String
getEndpointId
(ChannelModel channelModel, String tenantId) void
protected void
processOutboundDefinition
(JmsOutboundChannelModel channelModel) void
registerChannelModel
(ChannelModel channelModel, String tenantId, EventRegistry eventRegistry, EventRepositoryService eventRepositoryService, boolean fallbackToDefaultTenant) protected void
registerEndpoint
(JmsListenerEndpoint endpoint, JmsListenerContainerFactory<?> factory) Register a newJmsListenerEndpoint
alongside theJmsListenerContainerFactory
to use to create the underlying container.protected String
protected JmsListenerContainerFactory<?>
resolveContainerFactory
(JmsListenerEndpoint endpoint, JmsListenerContainerFactory<?> containerFactory) void
setApplicationContext
(ApplicationContext applicationContext) void
setBeanFactory
(BeanFactory beanFactory) void
setContainerFactory
(JmsListenerContainerFactory<?> containerFactory) void
setContainerFactoryBeanName
(String containerFactoryBeanName) void
setEndpointRegistry
(JmsListenerEndpointRegistry endpointRegistry) void
setJmsOperations
(JmsOperations jmsOperations) void
unregisterChannelModel
(ChannelModel channelModel, String tenantId, EventRepositoryService eventRepositoryService) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Field Details
-
CHANNEL_ID_PREFIX
- See Also:
-
logger
protected final org.slf4j.Logger logger -
jmsOperations
-
endpointRegistry
-
containerFactoryBeanName
-
containerFactory
-
beanFactory
-
applicationContext
-
contextRefreshed
protected boolean contextRefreshed -
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper -
embeddedValueResolver
-
-
Constructor Details
-
JmsChannelModelProcessor
public JmsChannelModelProcessor(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
canProcess
- Specified by:
canProcess
in interfaceChannelModelProcessor
-
canProcessIfChannelModelAlreadyRegistered
- Specified by:
canProcessIfChannelModelAlreadyRegistered
in interfaceChannelModelProcessor
-
registerChannelModel
public void registerChannelModel(ChannelModel channelModel, String tenantId, EventRegistry eventRegistry, EventRepositoryService eventRepositoryService, boolean fallbackToDefaultTenant) - Specified by:
registerChannelModel
in interfaceChannelModelProcessor
-
createJmsListenerEndpoint
protected JmsListenerEndpoint createJmsListenerEndpoint(JmsInboundChannelModel jmsChannelModel, String tenantId, EventRegistry eventRegistry) -
createMessageListener
protected jakarta.jms.MessageListener createMessageListener(EventRegistry eventRegistry, InboundChannelModel inboundChannelModel) -
processOutboundDefinition
-
createOutboundEventChannelAdapter
protected OutboundEventChannelAdapter createOutboundEventChannelAdapter(JmsOutboundChannelModel channelModel) -
unregisterChannelModel
public void unregisterChannelModel(ChannelModel channelModel, String tenantId, EventRepositoryService eventRepositoryService) - Specified by:
unregisterChannelModel
in interfaceChannelModelProcessor
-
registerEndpoint
protected void registerEndpoint(JmsListenerEndpoint endpoint, JmsListenerContainerFactory<?> factory) Register a newJmsListenerEndpoint
alongside theJmsListenerContainerFactory
to use to create the underlying container.The
factory
may benull
if the default factory has to be used for that endpoint. -
resolveContainerFactory
protected JmsListenerContainerFactory<?> resolveContainerFactory(JmsListenerEndpoint endpoint, JmsListenerContainerFactory<?> containerFactory) -
getEndpointId
-
resolve
-
setBeanFactory
- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
- Throws:
BeansException
-
setApplicationContext
- Specified by:
setApplicationContext
in interfaceApplicationContextAware
- Throws:
BeansException
-
onApplicationEvent
- Specified by:
onApplicationEvent
in interfaceApplicationListener<ContextRefreshedEvent>
-
getJmsOperations
-
setJmsOperations
-
getEndpointRegistry
-
setEndpointRegistry
-
getContainerFactoryBeanName
-
setContainerFactoryBeanName
-
getContainerFactory
-
setContainerFactory
-