Class SubscriberStubSettings (1.115.5)

public class SubscriberStubSettings extends StubSettings<SubscriberStubSettings>

Settings class to configure an instance of SubscriberStub.

The default instance has everything set to sensible defaults:

  • The default service address (pubsub.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of createSubscription to 30 seconds:


 SubscriberStubSettings.Builder subscriptionAdminSettingsBuilder =
     SubscriberStubSettings.newBuilder();
 subscriptionAdminSettingsBuilder
     .createSubscriptionSettings()
     .setRetrySettings(
         subscriptionAdminSettingsBuilder
             .createSubscriptionSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 SubscriberStubSettings subscriptionAdminSettings = subscriptionAdminSettingsBuilder.build();
 

Inheritance

java.lang.Object > StubSettings > SubscriberStubSettings

Static Methods

defaultApiClientHeaderProviderBuilder()

public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder()
Returns
TypeDescription
Builder

defaultCredentialsProviderBuilder()

public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()

Returns a builder for the default credentials for this service.

Returns
TypeDescription
Builder

defaultExecutorProviderBuilder()

public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()

Returns a builder for the default ExecutorProvider for this service.

Returns
TypeDescription
Builder

defaultGrpcTransportProviderBuilder()

public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()

Returns a builder for the default ChannelProvider for this service.

Returns
TypeDescription
Builder

defaultTransportChannelProvider()

public static TransportChannelProvider defaultTransportChannelProvider()
Returns
TypeDescription
TransportChannelProvider

getDefaultEndpoint()

public static String getDefaultEndpoint()

Returns the default service endpoint.

Returns
TypeDescription
String

getDefaultMtlsEndpoint()

public static String getDefaultMtlsEndpoint()

Returns the default mTLS service endpoint.

Returns
TypeDescription
String

getDefaultServiceScopes()

public static List<String> getDefaultServiceScopes()

Returns the default service scopes.

Returns
TypeDescription
List<String>

newBuilder()

public static SubscriberStubSettings.Builder newBuilder()

Returns a new builder for this class.

Returns
TypeDescription
SubscriberStubSettings.Builder

newBuilder(ClientContext clientContext)

public static SubscriberStubSettings.Builder newBuilder(ClientContext clientContext)

Returns a new builder for this class.

Parameter
NameDescription
clientContextClientContext
Returns
TypeDescription
SubscriberStubSettings.Builder

Constructors

SubscriberStubSettings(SubscriberStubSettings.Builder settingsBuilder)

protected SubscriberStubSettings(SubscriberStubSettings.Builder settingsBuilder)
Parameter
NameDescription
settingsBuilderSubscriberStubSettings.Builder

Methods

acknowledgeSettings()

public UnaryCallSettings<AcknowledgeRequest,Empty> acknowledgeSettings()

Returns the object with the settings used for calls to acknowledge.

Returns
TypeDescription
UnaryCallSettings<AcknowledgeRequest,Empty>

createSnapshotSettings()

public UnaryCallSettings<CreateSnapshotRequest,Snapshot> createSnapshotSettings()

Returns the object with the settings used for calls to createSnapshot.

Returns
TypeDescription
UnaryCallSettings<CreateSnapshotRequest,Snapshot>

createStub()

public SubscriberStub createStub()
Returns
TypeDescription
SubscriberStub
Exceptions
TypeDescription
IOException

createSubscriptionSettings()

public UnaryCallSettings<Subscription,Subscription> createSubscriptionSettings()

Returns the object with the settings used for calls to createSubscription.

Returns
TypeDescription
UnaryCallSettings<Subscription,Subscription>

deleteSnapshotSettings()

public UnaryCallSettings<DeleteSnapshotRequest,Empty> deleteSnapshotSettings()

Returns the object with the settings used for calls to deleteSnapshot.

Returns
TypeDescription
UnaryCallSettings<DeleteSnapshotRequest,Empty>

deleteSubscriptionSettings()

public UnaryCallSettings<DeleteSubscriptionRequest,Empty> deleteSubscriptionSettings()

Returns the object with the settings used for calls to deleteSubscription.

Returns
TypeDescription
UnaryCallSettings<DeleteSubscriptionRequest,Empty>

getIamPolicySettings()

public UnaryCallSettings<GetIamPolicyRequest,Policy> getIamPolicySettings()

Returns the object with the settings used for calls to getIamPolicy.

Returns
TypeDescription
UnaryCallSettings<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getSnapshotSettings()

public UnaryCallSettings<GetSnapshotRequest,Snapshot> getSnapshotSettings()

Returns the object with the settings used for calls to getSnapshot.

Returns
TypeDescription
UnaryCallSettings<GetSnapshotRequest,Snapshot>

getSubscriptionSettings()

public UnaryCallSettings<GetSubscriptionRequest,Subscription> getSubscriptionSettings()

Returns the object with the settings used for calls to getSubscription.

Returns
TypeDescription
UnaryCallSettings<GetSubscriptionRequest,Subscription>

listSnapshotsSettings()

public PagedCallSettings<ListSnapshotsRequest,ListSnapshotsResponse,SubscriptionAdminClient.ListSnapshotsPagedResponse> listSnapshotsSettings()

Returns the object with the settings used for calls to listSnapshots.

Returns
TypeDescription
PagedCallSettings<ListSnapshotsRequest,ListSnapshotsResponse,ListSnapshotsPagedResponse>

listSubscriptionsSettings()

public PagedCallSettings<ListSubscriptionsRequest,ListSubscriptionsResponse,SubscriptionAdminClient.ListSubscriptionsPagedResponse> listSubscriptionsSettings()

Returns the object with the settings used for calls to listSubscriptions.

Returns
TypeDescription
PagedCallSettings<ListSubscriptionsRequest,ListSubscriptionsResponse,ListSubscriptionsPagedResponse>

modifyAckDeadlineSettings()

public UnaryCallSettings<ModifyAckDeadlineRequest,Empty> modifyAckDeadlineSettings()

Returns the object with the settings used for calls to modifyAckDeadline.

Returns
TypeDescription
UnaryCallSettings<ModifyAckDeadlineRequest,Empty>

modifyPushConfigSettings()

public UnaryCallSettings<ModifyPushConfigRequest,Empty> modifyPushConfigSettings()

Returns the object with the settings used for calls to modifyPushConfig.

Returns
TypeDescription
UnaryCallSettings<ModifyPushConfigRequest,Empty>

pullSettings()

public UnaryCallSettings<PullRequest,PullResponse> pullSettings()

Returns the object with the settings used for calls to pull.

Returns
TypeDescription
UnaryCallSettings<PullRequest,PullResponse>

seekSettings()

public UnaryCallSettings<SeekRequest,SeekResponse> seekSettings()

Returns the object with the settings used for calls to seek.

Returns
TypeDescription
UnaryCallSettings<SeekRequest,SeekResponse>

setIamPolicySettings()

public UnaryCallSettings<SetIamPolicyRequest,Policy> setIamPolicySettings()

Returns the object with the settings used for calls to setIamPolicy.

Returns
TypeDescription
UnaryCallSettings<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

streamingPullSettings()

public StreamingCallSettings<StreamingPullRequest,StreamingPullResponse> streamingPullSettings()

Returns the object with the settings used for calls to streamingPull.

Returns
TypeDescription
StreamingCallSettings<StreamingPullRequest,StreamingPullResponse>

testIamPermissionsSettings()

public UnaryCallSettings<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsSettings()

Returns the object with the settings used for calls to testIamPermissions.

Returns
TypeDescription
UnaryCallSettings<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

toBuilder()

public SubscriberStubSettings.Builder toBuilder()

Returns a builder containing all the values of this settings class.

Returns
TypeDescription
SubscriberStubSettings.Builder
Overrides

updateSnapshotSettings()

public UnaryCallSettings<UpdateSnapshotRequest,Snapshot> updateSnapshotSettings()

Returns the object with the settings used for calls to updateSnapshot.

Returns
TypeDescription
UnaryCallSettings<UpdateSnapshotRequest,Snapshot>

updateSubscriptionSettings()

public UnaryCallSettings<UpdateSubscriptionRequest,Subscription> updateSubscriptionSettings()

Returns the object with the settings used for calls to updateSubscription.

Returns
TypeDescription
UnaryCallSettings<UpdateSubscriptionRequest,Subscription>