Interface HeaderChannelRegistry

All Known Implementing Classes:
DefaultHeaderChannelRegistry

public interface HeaderChannelRegistry
Implementations convert a channel to a name, retaining a reference to the channel keyed by the name. Allows a downstream BeanFactoryChannelResolver to find the channel by name in the event that the flow serialized the message at some point.
Since:
3.0
Author:
Gary Russell
  • Method Details

    • channelToChannelName

      Object channelToChannelName(Object channel)
      Converts the channel to a name (String). If the channel is not a MessageChannel, it is returned unchanged.
      Parameters:
      channel - The channel.
      Returns:
      The channel name, or the channel if it is not a MessageChannel.
    • channelToChannelName

      Object channelToChannelName(Object channel, long timeToLive)
      Converts the channel to a name (String). If the channel is not a MessageChannel, it is returned unchanged.
      Parameters:
      channel - The channel.
      timeToLive - How long (ms) at a minimum, the channel mapping should remain in the registry.
      Returns:
      The channel name, or the channel if it is not a MessageChannel.
      Since:
      4.1
    • channelNameToChannel

      MessageChannel channelNameToChannel(String name)
      Converts the channel name back to a MessageChannel (if it is registered).
      Parameters:
      name - The name of the channel.
      Returns:
      The channel, or null if there is no channel registered with the name.
    • size

      @ManagedAttribute int size()
      Returns:
      the current size of the registry
    • runReaper

      @ManagedOperation(description="Cancel the scheduled reap task and run immediately; then reschedule.") void runReaper()
      Cancel the scheduled reap task and run immediately; then reschedule.