Interface StreamingTransportProvider

All Superinterfaces:
AutoCloseable, TransportProvider

public interface StreamingTransportProvider extends TransportProvider
Optional transport extension for generic remote-object streaming.

Implementations must preserve the same target model as unary invocation: every stream targets a concrete ObjectRef and identifies the operation through MethodDescriptor. Implementations must map transport failures to middleware exceptions, preserve explicit ObjectRef values inside stream items, and enforce the same authorization and dispatch checks as unary invocation by routing server-side work through RuntimeTransportContext.dispatch(ObjectRef, MethodDescriptor, List, InvocationOptions).

This interface is transport-neutral and thread-safe. It is intentionally optional so existing transports can expose capability-specific diagnostics without changing TransportProvider.

  • Method Details

    • serverStream

      StreamHandle<Object> serverStream(ObjectRef target, MethodDescriptor method, List<EncodedValue> arguments, InvocationOptions options, Class<?> itemType)
      Opens a server-streaming invocation.
      Parameters:
      target - target object reference
      method - method descriptor
      arguments - encoded unary arguments for the stream-producing method
      options - invocation and stream metadata
      itemType - expected item type
      Returns:
      stream handle
    • clientStream

      Object clientStream(ObjectRef target, MethodDescriptor method, List<EncodedValue> items, InvocationOptions options)
      Opens a client-streaming invocation and returns the aggregate result.
      Parameters:
      target - target object reference
      method - method descriptor
      items - encoded stream items
      options - invocation and stream metadata
      Returns:
      decoded aggregate result
    • bidirectionalStream

      StreamHandle<Object> bidirectionalStream(ObjectRef target, MethodDescriptor method, List<EncodedValue> items, InvocationOptions options, Class<?> itemType)
      Opens a bidirectional stream.
      Parameters:
      target - target object reference
      method - method descriptor
      items - initial encoded outbound items
      options - invocation and stream metadata
      itemType - expected inbound item type
      Returns:
      stream handle