public static class PublisherSettings.Builder extends ServiceApiSettings.Builder
Modifier and Type | Method and Description |
---|---|
PublisherSettings.Builder |
applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings)
Applies the given settings to all of the API methods in this service.
|
PublisherSettings |
build() |
SimpleCallSettings.Builder<Topic,Topic> |
createTopicSettings()
Returns the builder for the settings used for calls to createTopic.
|
SimpleCallSettings.Builder<DeleteTopicRequest,Empty> |
deleteTopicSettings()
Returns the builder for the settings used for calls to deleteTopic.
|
SimpleCallSettings.Builder<GetTopicRequest,Topic> |
getTopicSettings()
Returns the builder for the settings used for calls to getTopic.
|
PageStreamingCallSettings.Builder<ListTopicsRequest,ListTopicsResponse,Topic> |
listTopicsSettings()
Returns the builder for the settings used for calls to listTopics.
|
PageStreamingCallSettings.Builder<ListTopicSubscriptionsRequest,ListTopicSubscriptionsResponse,java.lang.String> |
listTopicSubscriptionsSettings()
Returns the builder for the settings used for calls to listTopicSubscriptions.
|
PublisherSettings.Builder |
provideChannelWith(ConnectionSettings settings)
Provides the connection settings necessary to create a channel.
|
PublisherSettings.Builder |
provideChannelWith(com.google.auth.Credentials credentials)
Provides the credentials necessary to create a channel.
|
PublisherSettings.Builder |
provideChannelWith(java.util.List<java.lang.String> scopes)
Provides a list of scopes that will be applied to the credentials used to create a channel.
|
PublisherSettings.Builder |
provideChannelWith(io.grpc.ManagedChannel channel,
boolean shouldAutoClose)
Sets a channel for this ServiceApiSettings to use.
|
PublisherSettings.Builder |
provideExecutorWith(java.util.concurrent.ScheduledExecutorService executor,
boolean shouldAutoClose)
Sets the executor to use for channels, retries, and bundling.
|
BundlingCallSettings.Builder<PublishRequest,PublishResponse> |
publishSettings()
Returns the builder for the settings used for calls to publish.
|
PublisherSettings.Builder |
setClientLibHeader(java.lang.String name,
java.lang.String version)
Sets the client library name and version for the GRPC custom header.
|
PublisherSettings.Builder |
setGeneratorHeader(java.lang.String name,
java.lang.String version)
Sets the generator name and version for the GRPC custom header.
|
getChannelProvider, getClientLibName, getClientLibVersion, getExecutorProvider, getGeneratorName, getGeneratorVersion
public PublisherSettings.Builder provideExecutorWith(java.util.concurrent.ScheduledExecutorService executor, boolean shouldAutoClose)
ServiceApiSettings.Builder
ExecutorProvider
from throwing an IllegalStateException
. See
ExecutorProvider
for more details.provideExecutorWith
in class ServiceApiSettings.Builder
public PublisherSettings.Builder provideChannelWith(io.grpc.ManagedChannel channel, boolean shouldAutoClose)
ServiceApiSettings.Builder
ChannelProvider
from throwing an IllegalStateException
. See
ChannelProvider
for more details.provideChannelWith
in class ServiceApiSettings.Builder
public PublisherSettings.Builder provideChannelWith(ConnectionSettings settings)
ServiceApiSettings.Builder
provideChannelWith
in class ServiceApiSettings.Builder
public PublisherSettings.Builder provideChannelWith(com.google.auth.Credentials credentials)
ServiceApiSettings.Builder
provideChannelWith
in class ServiceApiSettings.Builder
public PublisherSettings.Builder provideChannelWith(java.util.List<java.lang.String> scopes)
ServiceApiSettings.Builder
provideChannelWith
in class ServiceApiSettings.Builder
public PublisherSettings.Builder setGeneratorHeader(java.lang.String name, java.lang.String version)
ServiceApiSettings.Builder
setGeneratorHeader
in class ServiceApiSettings.Builder
public PublisherSettings.Builder setClientLibHeader(java.lang.String name, java.lang.String version)
ServiceApiSettings.Builder
setClientLibHeader
in class ServiceApiSettings.Builder
public PublisherSettings.Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws java.lang.Exception
java.lang.Exception
public SimpleCallSettings.Builder<Topic,Topic> createTopicSettings()
public BundlingCallSettings.Builder<PublishRequest,PublishResponse> publishSettings()
public SimpleCallSettings.Builder<GetTopicRequest,Topic> getTopicSettings()
public PageStreamingCallSettings.Builder<ListTopicsRequest,ListTopicsResponse,Topic> listTopicsSettings()
public PageStreamingCallSettings.Builder<ListTopicSubscriptionsRequest,ListTopicSubscriptionsResponse,java.lang.String> listTopicSubscriptionsSettings()
public SimpleCallSettings.Builder<DeleteTopicRequest,Empty> deleteTopicSettings()
public PublisherSettings build() throws java.io.IOException
build
in class ServiceApiSettings.Builder
java.io.IOException