Interface MessagingChannel<T>

Type Parameters:
T - payload type
All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
MessagingChannel.BuilderBase.MessagingChannelImpl

public interface MessagingChannel<T> extends Prototype.Api
Immutable typed handle identifying a channel in a MessagingGraph.

A channel handle does not own topology or lifecycle. Register it with a graph and use MessagingGraph.emitter(io.helidon.messaging.MessagingChannel) for imperative emission. Close the graph to release its channel resources. The runtime's managed channels also implement this interface.

See Also:
  • Method Details

    • builder

      static <T> MessagingChannel.Builder<T> builder()
      Create a new fluent API builder to customize configuration.
      Type Parameters:
      T - payload type
      Returns:
      a new builder
    • builder

      static <T> MessagingChannel.Builder<T> builder(MessagingChannel<T> instance)
      Create a new fluent API builder from an existing instance.
      Type Parameters:
      T - payload type
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static <T> MessagingChannel<T> create(String name, Class<T> payloadType)
      Create a typed channel handle.
      Type Parameters:
      T - payload type
      Parameters:
      name - channel name
      payloadType - payload type
      Returns:
      channel handle
    • create

      static <T> MessagingChannel<T> create(String name, GenericType<T> payloadType)
      Create a channel handle preserving the complete payload type.
      Type Parameters:
      T - payload type
      Parameters:
      name - channel name
      payloadType - payload type
      Returns:
      channel handle
    • name

      String name()
      Channel name.
      Returns:
      channel name
    • payloadType

      GenericType<T> payloadType()
      Complete channel payload type.
      Returns:
      payload type