switch subscriptionchannelfactory to autowire
This commit is contained in:
parent
41b5eb2484
commit
b33ad73d46
|
@ -211,7 +211,7 @@ public abstract class BaseConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public SubscriptionChannelFactory subscriptionChannelFactory() {
|
public SubscriptionChannelFactory subscriptionChannelFactory() {
|
||||||
return new SubscriptionChannelFactory(subscribableChannelFactory());
|
return new SubscriptionChannelFactory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|
|
@ -22,16 +22,14 @@ package ca.uhn.fhir.jpa.subscription.module.channel;
|
||||||
|
|
||||||
import ca.uhn.fhir.jpa.subscription.module.ResourceModifiedMessage;
|
import ca.uhn.fhir.jpa.subscription.module.ResourceModifiedMessage;
|
||||||
import ca.uhn.fhir.jpa.subscription.module.subscriber.ResourceDeliveryMessage;
|
import ca.uhn.fhir.jpa.subscription.module.subscriber.ResourceDeliveryMessage;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.messaging.SubscribableChannel;
|
import org.springframework.messaging.SubscribableChannel;
|
||||||
|
|
||||||
public class SubscriptionChannelFactory {
|
public class SubscriptionChannelFactory {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
private ISubscribableChannelFactory mySubscribableChannelFactory;
|
private ISubscribableChannelFactory mySubscribableChannelFactory;
|
||||||
|
|
||||||
public SubscriptionChannelFactory(ISubscribableChannelFactory theSubscribableChannelFactory) {
|
|
||||||
mySubscribableChannelFactory = theSubscribableChannelFactory;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SubscribableChannel newDeliveryChannel(String theChannelName) {
|
public SubscribableChannel newDeliveryChannel(String theChannelName) {
|
||||||
return mySubscribableChannelFactory.createSubscribableChannel(theChannelName, ResourceDeliveryMessage.class, mySubscribableChannelFactory.getDeliveryChannelConcurrentConsumers());
|
return mySubscribableChannelFactory.createSubscribableChannel(theChannelName, ResourceDeliveryMessage.class, mySubscribableChannelFactory.getDeliveryChannelConcurrentConsumers());
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,6 @@ public abstract class BaseSubscriptionConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public SubscriptionChannelFactory subscriptionChannelFactory() {
|
public SubscriptionChannelFactory subscriptionChannelFactory() {
|
||||||
return new SubscriptionChannelFactory(subscribableChannelFactory());
|
return new SubscriptionChannelFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue