Interface PollableChannel

    • Method Detail

      • receive

        @Nullable
        Message<?> receive()
        Receive a message from this channel, blocking indefinitely if necessary.
        Returns:
        the next available Message or null if interrupted
      • receive

        @Nullable
        Message<?> receive​(long timeout)
        Receive a message from this channel, blocking until either a message is available or the specified timeout period elapses.
        Parameters:
        timeout - the timeout in milliseconds or MessageChannel.INDEFINITE_TIMEOUT.
        Returns:
        the next available Message or null if the specified timeout period elapses or the message reception is interrupted