protected void initialize() { synchronized (this.getLifecycleMonitor()) { if (this.destinationResolver == null) { if (this.resourceIdResolver == null) { this.destinationResolver = new CachingDestinationResolverProxy<>(new DynamicQueueUrlDestinationResolver(this.amazonSqs)); } else { this.destinationResolver = new CachingDestinationResolverProxy<>(new DynamicQueueUrlDestinationResolver(this.amazonSqs, this.resourceIdResolver)); } } for (QueueMessageHandler.MappingInformation mappingInformation : this.messageHandler.getHandlerMethods().keySet()) { for (String queue : mappingInformation.getLogicalResourceIds()) { QueueAttributes queueAttributes = queueAttributes(queue, mappingInformation.getDeletionPolicy()); if (queueAttributes != null) { this.registeredQueues.put(queue, queueAttributes); } } } this.active = true; this.getLifecycleMonitor().notifyAll(); } }
protected void initialize() { synchronized (this.getLifecycleMonitor()) { if (this.destinationResolver == null) { if (this.resourceIdResolver == null) { this.destinationResolver = new CachingDestinationResolverProxy<>(new DynamicQueueUrlDestinationResolver(this.amazonSqs)); } else { this.destinationResolver = new CachingDestinationResolverProxy<>(new DynamicQueueUrlDestinationResolver(this.amazonSqs, this.resourceIdResolver)); } } for (QueueMessageHandler.MappingInformation mappingInformation : this.messageHandler.getHandlerMethods().keySet()) { for (String queue : mappingInformation.getLogicalResourceIds()) { QueueAttributes queueAttributes = queueAttributes(queue, mappingInformation.getDeletionPolicy()); if (queueAttributes != null) { this.registeredQueues.put(queue, queueAttributes); } } } this.active = true; this.getLifecycleMonitor().notifyAll(); } }