Class LinkedBlockingChannelFactory
java.lang.Object
ca.uhn.fhir.jpa.subscription.channel.impl.LinkedBlockingChannelFactory
- All Implemented Interfaces:
IChannelFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetOrCreateProducer
(String theChannelName, Class<?> theMessageType, ChannelProducerSettings theChannelSettings) Create a channel that is used to send messages to the queue.getOrCreateReceiver
(String theChannelName, Class<?> theMessageType, ChannelConsumerSettings theChannelSettings) Create a channel that is used to receive messages from the queue.void
stop()
-
Constructor Details
-
LinkedBlockingChannelFactory
-
-
Method Details
-
getOrCreateReceiver
public IChannelReceiver getOrCreateReceiver(String theChannelName, Class<?> theMessageType, ChannelConsumerSettings theChannelSettings) Description copied from interface:IChannelFactory
Create a channel that is used to receive messages from the queue.Implementations can choose to return the same object for multiple invocations of this method (and
IChannelFactory.getOrCreateReceiver(String, Class, ChannelConsumerSettings)
when invoked with the same theChannelName if they need to, or they can create a new instance.- Specified by:
getOrCreateReceiver
in interfaceIChannelFactory
- Parameters:
theChannelName
- The actual underlying queue nametheMessageType
- The object type that will be placed on this queue. Objects will be Jackson-annotated structures.theChannelSettings
- Contains the configuration for subscribers.
-
getOrCreateProducer
public IChannelProducer getOrCreateProducer(String theChannelName, Class<?> theMessageType, ChannelProducerSettings theChannelSettings) Description copied from interface:IChannelFactory
Create a channel that is used to send messages to the queue.Implementations can choose to return the same object for multiple invocations of this method (and
IChannelFactory.getOrCreateReceiver(String, Class, ChannelConsumerSettings)
when invoked with the same theChannelName if they need to, or they can create a new instance.- Specified by:
getOrCreateProducer
in interfaceIChannelFactory
- Parameters:
theChannelName
- The actual underlying queue nametheMessageType
- The object type that will be placed on this queue. Objects will be Jackson-annotated structures.theChannelSettings
- Contains the configuration for senders.
-
getChannelNamer
- Specified by:
getChannelNamer
in interfaceIChannelFactory
- Returns:
- the IChannelNamer used by this factory
-
stop
-