Class AbstractStreamBasedClientBuilder<B extends AbstractStreamBasedClientBuilder,​C>

  • Type Parameters:
    B - actual class of the builder
    C - client class
    Direct Known Subclasses:
    StreamAsyncClientBuilder, StreamClientBuilder

    public abstract class AbstractStreamBasedClientBuilder<B extends AbstractStreamBasedClientBuilder,​C>
    extends ClientBuilderBase<B,​C>
    A builder for a client that requires a stream.
    • Constructor Detail

      • AbstractStreamBasedClientBuilder

        public AbstractStreamBasedClientBuilder​(Service service)
        Creates a new AbstractStreamBasedClientBuilder object.
    • Method Detail

      • stream

        public B stream​(Stream stream)
        Set the stream.

        May be null

        Parameters:
        stream - the stream to use. May be null.
        Returns:
        this builder
      • streamSummary

        public B streamSummary​(StreamSummary streamSummary)
        Set the stream summary.

        May be null

        Parameters:
        streamSummary - the stream summary to use. May be null
        Returns:
        this builder
      • getEndpoint

        protected String getEndpoint()
        Gets the endpoint that is either provided, defined within the stream, or defined within the stream summary.
        Returns:
        the endpoint
        Throws:
        IllegalArgumentException - if more than one endpoint is defined
      • copyFrom

        public B copyFrom​(B fromBuilder)
        Set the values in this builder to be the same as in the provided other builder.
        Overrides:
        copyFrom in class ClientBuilderBase<B extends AbstractStreamBasedClientBuilder,​C>
        Parameters:
        fromBuilder - other builder
        Returns:
        this builder, with updated values