Class RabbitChannelDefinitionProcessor
java.lang.Object
org.flowable.eventregistry.spring.rabbit.RabbitChannelDefinitionProcessor
- All Implemented Interfaces:
EventListener,ChannelModelProcessor,Aware,BeanFactoryAware,ApplicationContextAware,ApplicationListener<ContextRefreshedEvent>
public class RabbitChannelDefinitionProcessor
extends Object
implements BeanFactoryAware, ApplicationContextAware, ApplicationListener<ContextRefreshedEvent>, ChannelModelProcessor
- Author:
- Filip Hrisafov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ApplicationContextprotected BeanFactorystatic final Stringprotected RabbitListenerContainerFactory<?>protected Stringprotected booleanprotected StringValueResolverprotected RabbitListenerEndpointRegistryprotected BeanExpressionContextprotected final org.slf4j.Loggerprotected com.fasterxml.jackson.databind.ObjectMapperprotected RabbitOperationsprotected BeanExpressionResolver -
Constructor Summary
ConstructorsConstructorDescriptionRabbitChannelDefinitionProcessor(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanProcess(ChannelModel channelModel) booleancanProcessIfChannelModelAlreadyRegistered(ChannelModel channelModel) protected MessageListenercreateMessageListener(EventRegistry eventRegistry, InboundChannelModel inboundChannelModel) protected RabbitListenerEndpointcreateRabbitListenerEndpoint(RabbitInboundChannelModel channelModel, String tenantId, EventRegistry eventRegistry) protected StringgetEndpointId(ChannelModel channelModel, String tenantId) voidprotected voidprocessOutboundDefinition(RabbitOutboundChannelModel channelDefinition) voidregisterChannelModel(ChannelModel channelModel, String tenantId, EventRegistry eventRegistry, EventRepositoryService eventRepositoryService, boolean fallbackToDefaultTenant) protected voidregisterEndpoint(RabbitListenerEndpoint endpoint, RabbitListenerContainerFactory<?> factory) Register a newRabbitListenerEndpointalongside theRabbitListenerContainerFactoryto use to create the underlying container.protected Stringprotected AcknowledgeModeresolveAckMode(RabbitInboundChannelModel channelDefinition) protected RabbitAdminresolveAdmin(RabbitInboundChannelModel channelDefinition) protected RabbitListenerContainerFactory<?>resolveContainerFactory(RabbitListenerEndpoint endpoint, RabbitListenerContainerFactory<?> containerFactory) protected TaskExecutorresolveExecutor(RabbitInboundChannelModel channelDefinition) protected ObjectresolveExpression(String value) protected StringresolveExpressionAsStringOrInteger(String value, String attribute) protected IntegerresolvePriority(RabbitInboundChannelModel channelDefinition) protected voidresolveQueues(Object resolvedValue, List<String> result, RabbitInboundChannelModel channelDefinition) protected String[]resolveQueues(RabbitInboundChannelModel channelDefinition) voidsetApplicationContext(ApplicationContext applicationContext) voidsetBeanFactory(BeanFactory beanFactory) voidsetContainerFactory(RabbitListenerContainerFactory<?> containerFactory) voidsetContainerFactoryBeanName(String containerFactoryBeanName) voidsetEndpointRegistry(RabbitListenerEndpointRegistry endpointRegistry) voidsetRabbitOperations(RabbitOperations rabbitOperations) voidunregisterChannelModel(ChannelModel channelModel, String tenantId, EventRepositoryService eventRepositoryService) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Field Details
-
CHANNEL_ID_PREFIX
- See Also:
-
logger
protected final org.slf4j.Logger logger -
endpointRegistry
-
containerFactoryBeanName
-
rabbitOperations
-
containerFactory
-
beanFactory
-
applicationContext
-
contextRefreshed
protected boolean contextRefreshed -
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper -
resolver
-
embeddedValueResolver
-
expressionContext
-
-
Constructor Details
-
RabbitChannelDefinitionProcessor
public RabbitChannelDefinitionProcessor(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
canProcess
- Specified by:
canProcessin interfaceChannelModelProcessor
-
canProcessIfChannelModelAlreadyRegistered
- Specified by:
canProcessIfChannelModelAlreadyRegisteredin interfaceChannelModelProcessor
-
registerChannelModel
public void registerChannelModel(ChannelModel channelModel, String tenantId, EventRegistry eventRegistry, EventRepositoryService eventRepositoryService, boolean fallbackToDefaultTenant) - Specified by:
registerChannelModelin interfaceChannelModelProcessor
-
createRabbitListenerEndpoint
protected RabbitListenerEndpoint createRabbitListenerEndpoint(RabbitInboundChannelModel channelModel, String tenantId, EventRegistry eventRegistry) -
processOutboundDefinition
-
resolveExpressionAsStringOrInteger
-
resolveQueues
-
resolveQueues
protected void resolveQueues(Object resolvedValue, List<String> result, RabbitInboundChannelModel channelDefinition) -
resolvePriority
-
resolveAdmin
-
resolveAckMode
-
resolveExecutor
-
resolveExpression
-
createMessageListener
protected MessageListener createMessageListener(EventRegistry eventRegistry, InboundChannelModel inboundChannelModel) -
unregisterChannelModel
public void unregisterChannelModel(ChannelModel channelModel, String tenantId, EventRepositoryService eventRepositoryService) - Specified by:
unregisterChannelModelin interfaceChannelModelProcessor
-
registerEndpoint
protected void registerEndpoint(RabbitListenerEndpoint endpoint, RabbitListenerContainerFactory<?> factory) Register a newRabbitListenerEndpointalongside theRabbitListenerContainerFactoryto use to create the underlying container.The
factorymay benullif the default factory has to be used for that endpoint. -
resolveContainerFactory
protected RabbitListenerContainerFactory<?> resolveContainerFactory(RabbitListenerEndpoint endpoint, RabbitListenerContainerFactory<?> containerFactory) -
getEndpointId
-
resolve
-
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Throws:
BeansException
-
setApplicationContext
- Specified by:
setApplicationContextin interfaceApplicationContextAware- Throws:
BeansException
-
onApplicationEvent
- Specified by:
onApplicationEventin interfaceApplicationListener<ContextRefreshedEvent>
-
getRabbitOperations
-
setRabbitOperations
-
getEndpointRegistry
-
setEndpointRegistry
-
getContainerFactoryBeanName
-
setContainerFactoryBeanName
-
getContainerFactory
-
setContainerFactory
-