Package 

Class StreamComponentProvider


  • 
    public final class StreamComponentProvider
    
                        

    Optional overrides for internal components used by StreamClient.

    All fields default to null, meaning the factory creates default instances. Provide a non-null value to replace a specific component — useful for sharing instances across product layers or injecting custom implementations.

    // Share a single-flight processor between core and product API layer
    val singleFlight = StreamSingleFlightProcessor(scope)
    
    val client = StreamClient(
        ...,
        components = StreamComponentProvider(
            singleFlight = singleFlight,
        ),
    )
    
    val productApi = MyProductApi(singleFlight) // same instance