Class LinkedBlockingBrokerClient

java.lang.Object
ca.uhn.fhir.broker.impl.LinkedBlockingBrokerClient
All Implemented Interfaces:
IBrokerClient

public class LinkedBlockingBrokerClient extends Object implements IBrokerClient
  • Constructor Details

  • Method Details

    • getOrCreateConsumer

      public <T> IChannelConsumer<T> getOrCreateConsumer(String theChannelName, Class<? extends ca.uhn.fhir.rest.server.messaging.IMessage<T>> theMessageType, IMessageListener<T> theMessageListener, ChannelConsumerSettings theChannelConsumerSettings)
      Description copied from interface: IBrokerClient
      Create a consumer that receives messages from the channel.

      Implementations can choose to return the same object for multiple invocations of this method when invoked with the same theChannelName if they need to, or they can create a new instance.

      Specified by:
      getOrCreateConsumer in interface IBrokerClient
      Parameters:
      theChannelName - The actual underlying channel name
      theMessageType - The object type that will be placed on this chanel. Objects will usually be a Jackson-annotated class.
      theMessageListener - The message handler that will be called for each arriving message. If more than one message listeners is required for a single consumer, MultiplexingListener can be used for the listener.
      theChannelConsumerSettings - Defines the consumer configuration (e.g. number of listening threads)
    • getOrCreateProducer

      public <T> IChannelProducer<T> getOrCreateProducer(String theChannelName, Class<? extends ca.uhn.fhir.rest.server.messaging.IMessage<T>> theMessageType, ChannelProducerSettings theChannelProducerSettings)
      Description copied from interface: IBrokerClient
      Create a producer that is used to send messages to the channel.

      Implementations can choose to return the same object for multiple invocations of this method when invoked with the same theChannelName if they need to, or they can create a new instance.

      Specified by:
      getOrCreateProducer in interface IBrokerClient
      Parameters:
      theChannelName - The actual underlying channel name
      theMessageType - The object type that will be placed on this channel. Objects will be Jackson-annotated structures.
      theChannelProducerSettings - Contains the configuration for senders.
    • getChannelNamer

      Specified by:
      getChannelNamer in interface IBrokerClient
      Returns:
      the IChannelNamer used by this broker client.
    • setLinkedBlockingChannelFactory

      @Autowired public void setLinkedBlockingChannelFactory(LinkedBlockingChannelFactory theLinkedBlockingChannelFactory)