Interface IChannelFactory

  • All Known Implementing Classes:
    LinkedBlockingChannelFactory

    public interface IChannelFactory
    This interface is the factory for Queue Channels, which are the low level abstraction over a queue (e.g. memory queue, JMS queue, Kafka stream, etc.) for any purpose.
    • Method Detail

      • getOrCreateReceiver

        IChannelReceiver getOrCreateReceiver​(String theChannelName,
                                             Class<?> theMessageType,
                                             ChannelConsumerSettings theChannelSettings)
        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 getOrCreateReceiver(String, Class, ChannelConsumerSettings) when invoked with the same theChannelName if they need to, or they can create a new instance.

        Parameters:
        theChannelName - The actual underlying queue name
        theMessageType - The object type that will be placed on this queue. Objects will be Jackson-annotated structures.
        theChannelSettings - Contains the configuration for subscribers.
      • getOrCreateProducer

        IChannelProducer getOrCreateProducer​(String theChannelName,
                                             Class<?> theMessageType,
                                             ChannelProducerSettings theChannelSettings)
        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 getOrCreateReceiver(String, Class, ChannelConsumerSettings) when invoked with the same theChannelName if they need to, or they can create a new instance.

        Parameters:
        theChannelName - The actual underlying queue name
        theMessageType - The object type that will be placed on this queue. Objects will be Jackson-annotated structures.
        theChannelSettings - Contains the configuration for senders.