Package com.oracle.bmc.streaming
Class AbstractStreamBasedClientBuilder<B extends AbstractStreamBasedClientBuilder,C>
- java.lang.Object
-
- com.oracle.bmc.common.ClientBuilderBase<B,C>
-
- com.oracle.bmc.streaming.AbstractStreamBasedClientBuilder<B,C>
-
- Type Parameters:
B
- actual class of the builderC
- 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.
-
-
Field Summary
Fields Modifier and Type Field Description protected Stream
stream
protected StreamSummary
streamSummary
-
Fields inherited from class com.oracle.bmc.common.ClientBuilderBase
additionalClientConfigurators, clientConfigurator, configuration, endpoint, requestSignerFactory
-
-
Constructor Summary
Constructors Constructor Description AbstractStreamBasedClientBuilder(Service service)
Creates a new AbstractStreamBasedClientBuilder object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description B
copyFrom(B fromBuilder)
Set the values in this builder to be the same as in the provided other builder.protected String
getEndpoint()
Gets the endpoint that is either provided, defined within the stream, or defined within the stream summary.B
stream(Stream stream)
Set the stream.B
streamSummary(StreamSummary streamSummary)
Set the stream summary.-
Methods inherited from class com.oracle.bmc.common.ClientBuilderBase
additionalClientConfigurator, additionalClientConfigurators, build, clientConfigurator, configuration, endpoint, httpProvider, requestSignerFactory, signingStrategyRequestSignerFactories
-
-
-
-
Field Detail
-
stream
protected Stream stream
-
streamSummary
protected StreamSummary streamSummary
-
-
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 classClientBuilderBase<B extends AbstractStreamBasedClientBuilder,C>
- Parameters:
fromBuilder
- other builder- Returns:
- this builder, with updated values
-
-