Interface MessageChannel<P extends ChannelPayload>

Type Parameters:
P - the type of payload handled by this channel

public interface MessageChannel<P extends ChannelPayload>
Communication pipe for sending and receiving ChannelPayloads.
  • Method Details

    • to

      Targets one or more servers for sending.
      Parameters:
      targets - the destination servers
      Returns:
      a sender scoped to the given targets
    • toAll

      Targets all connected servers for sending.
      Returns:
      a sender that broadcasts to every connected server
    • listen

      Subscription listen(MessageListener<P> listener)
      Subscribes a listener to messages received on this channel.
      Parameters:
      listener - the listener to call for incoming messages
      Returns:
      a subscription handle to cancel the listener