Interface StreamingTransportProvider
- All Superinterfaces:
AutoCloseable, 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 Summary
Modifier and TypeMethodDescriptionbidirectionalStream(ObjectRef target, MethodDescriptor method, List<EncodedValue> items, InvocationOptions options, Class<?> itemType) Opens a bidirectional stream.clientStream(ObjectRef target, MethodDescriptor method, List<EncodedValue> items, InvocationOptions options) Opens a client-streaming invocation and returns the aggregate result.serverStream(ObjectRef target, MethodDescriptor method, List<EncodedValue> arguments, InvocationOptions options, Class<?> itemType) Opens a server-streaming invocation.Methods inherited from interface TransportProvider
close, createProxy, export, id, invoke, invoke, invokeAsync, start, unexport
-
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 referencemethod- method descriptorarguments- encoded unary arguments for the stream-producing methodoptions- invocation and stream metadataitemType- 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 referencemethod- method descriptoritems- encoded stream itemsoptions- 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 referencemethod- method descriptoritems- initial encoded outbound itemsoptions- invocation and stream metadataitemType- expected inbound item type- Returns:
- stream handle
-