Class AppHubStubSettings (0.44.0)

publicclass AppHubStubSettingsextendsStubSettings<AppHubStubSettings>

Settings class to configure an instance of AppHubStub.

The default instance has everything set to sensible defaults:

  • The default service address (apphub.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 RetrySettings of lookupServiceProjectAttachment:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
AppHubStubSettings.BuilderappHubSettingsBuilder=AppHubStubSettings.newBuilder();
appHubSettingsBuilder
.lookupServiceProjectAttachmentSettings()
.setRetrySettings(
appHubSettingsBuilder
.lookupServiceProjectAttachmentSettings()
.getRetrySettings()
.toBuilder()
.setInitialRetryDelayDuration(Duration.ofSeconds(1))
.setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
.setMaxAttempts(5)
.setMaxRetryDelayDuration(Duration.ofSeconds(30))
.setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
.setRetryDelayMultiplier(1.3)
.setRpcTimeoutMultiplier(1.5)
.setTotalTimeoutDuration(Duration.ofSeconds(300))
.build());
AppHubStubSettingsappHubSettings=appHubSettingsBuilder.build();

Please refer to the Client Side Retry Guide for additional support in setting retries.

To configure the RetrySettings of a Long Running Operation method, create an OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to configure the RetrySettings for createServiceProjectAttachment:


// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
AppHubStubSettings.BuilderappHubSettingsBuilder=AppHubStubSettings.newBuilder();
TimedRetryAlgorithmtimedRetryAlgorithm=
OperationalTimedPollAlgorithm.create(
RetrySettings.newBuilder()
.setInitialRetryDelayDuration(Duration.ofMillis(500))
.setRetryDelayMultiplier(1.5)
.setMaxRetryDelayDuration(Duration.ofMillis(5000))
.setTotalTimeoutDuration(Duration.ofHours(24))
.build());
appHubSettingsBuilder
.createClusterOperationSettings()
.setPollingAlgorithm(timedRetryAlgorithm)
.build();

Inheritance

java.lang.Object > StubSettings > AppHubStubSettings

Inherited Members

Static Methods

defaultApiClientHeaderProviderBuilder()

publicstaticApiClientHeaderProvider.BuilderdefaultApiClientHeaderProviderBuilder()
Returns
Type Description
Builder

defaultCredentialsProviderBuilder()

publicstaticGoogleCredentialsProvider.BuilderdefaultCredentialsProviderBuilder()

Returns a builder for the default credentials for this service.

Returns
Type Description
Builder

defaultExecutorProviderBuilder()

publicstaticInstantiatingExecutorProvider.BuilderdefaultExecutorProviderBuilder()

Returns a builder for the default ExecutorProvider for this service.

Returns
Type Description
Builder

defaultGrpcApiClientHeaderProviderBuilder()

publicstaticApiClientHeaderProvider.BuilderdefaultGrpcApiClientHeaderProviderBuilder()
Returns
Type Description
Builder

defaultGrpcTransportProviderBuilder()

publicstaticInstantiatingGrpcChannelProvider.BuilderdefaultGrpcTransportProviderBuilder()

Returns a builder for the default gRPC ChannelProvider for this service.

Returns
Type Description
Builder

defaultHttpJsonApiClientHeaderProviderBuilder()

publicstaticApiClientHeaderProvider.BuilderdefaultHttpJsonApiClientHeaderProviderBuilder()
Returns
Type Description
Builder

defaultHttpJsonTransportProviderBuilder()

publicstaticInstantiatingHttpJsonChannelProvider.BuilderdefaultHttpJsonTransportProviderBuilder()

Returns a builder for the default REST ChannelProvider for this service.

Returns
Type Description
Builder

defaultTransportChannelProvider()

publicstaticTransportChannelProviderdefaultTransportChannelProvider()
Returns
Type Description
TransportChannelProvider

getDefaultEndpoint()

publicstaticStringgetDefaultEndpoint()

Returns the default service endpoint.

Returns
Type Description
String

getDefaultMtlsEndpoint()

publicstaticStringgetDefaultMtlsEndpoint()

Returns the default mTLS service endpoint.

Returns
Type Description
String

getDefaultServiceScopes()

publicstaticList<String>getDefaultServiceScopes()

Returns the default service scopes.

Returns
Type Description
List<String>

newBuilder()

publicstaticAppHubStubSettings.BuildernewBuilder()

Returns a new gRPC builder for this class.

Returns
Type Description
AppHubStubSettings.Builder

newBuilder(ClientContext clientContext)

publicstaticAppHubStubSettings.BuildernewBuilder(ClientContextclientContext)

Returns a new builder for this class.

Parameter
Name Description
clientContext ClientContext
Returns
Type Description
AppHubStubSettings.Builder

newHttpJsonBuilder()

publicstaticAppHubStubSettings.BuildernewHttpJsonBuilder()

Returns a new REST builder for this class.

Returns
Type Description
AppHubStubSettings.Builder

Constructors

AppHubStubSettings(AppHubStubSettings.Builder settingsBuilder)

protectedAppHubStubSettings(AppHubStubSettings.BuildersettingsBuilder)
Parameter
Name Description
settingsBuilder AppHubStubSettings.Builder

Methods

createApplicationOperationSettings()

publicOperationCallSettings<CreateApplicationRequest,Application,OperationMetadata>createApplicationOperationSettings()

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

Returns
Type Description
OperationCallSettings<CreateApplicationRequest,Application,OperationMetadata>

createApplicationSettings()

publicUnaryCallSettings<CreateApplicationRequest,Operation>createApplicationSettings()

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

Returns
Type Description
UnaryCallSettings<CreateApplicationRequest,Operation>

createServiceOperationSettings()

publicOperationCallSettings<CreateServiceRequest,Service,OperationMetadata>createServiceOperationSettings()

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

Returns
Type Description
OperationCallSettings<CreateServiceRequest,Service,OperationMetadata>

createServiceProjectAttachmentOperationSettings()

publicOperationCallSettings<CreateServiceProjectAttachmentRequest,ServiceProjectAttachment,OperationMetadata>createServiceProjectAttachmentOperationSettings()

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

Returns
Type Description
OperationCallSettings<CreateServiceProjectAttachmentRequest,ServiceProjectAttachment,OperationMetadata>

createServiceProjectAttachmentSettings()

publicUnaryCallSettings<CreateServiceProjectAttachmentRequest,Operation>createServiceProjectAttachmentSettings()

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

Returns
Type Description
UnaryCallSettings<CreateServiceProjectAttachmentRequest,Operation>

createServiceSettings()

publicUnaryCallSettings<CreateServiceRequest,Operation>createServiceSettings()

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

Returns
Type Description
UnaryCallSettings<CreateServiceRequest,Operation>

createStub()

publicAppHubStubcreateStub()
Returns
Type Description
AppHubStub
Exceptions
Type Description
IOException

createWorkloadOperationSettings()

publicOperationCallSettings<CreateWorkloadRequest,Workload,OperationMetadata>createWorkloadOperationSettings()

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

Returns
Type Description
OperationCallSettings<CreateWorkloadRequest,Workload,OperationMetadata>

createWorkloadSettings()

publicUnaryCallSettings<CreateWorkloadRequest,Operation>createWorkloadSettings()

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

Returns
Type Description
UnaryCallSettings<CreateWorkloadRequest,Operation>

deleteApplicationOperationSettings()

publicOperationCallSettings<DeleteApplicationRequest,Empty,OperationMetadata>deleteApplicationOperationSettings()

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

Returns
Type Description
OperationCallSettings<DeleteApplicationRequest,Empty,OperationMetadata>

deleteApplicationSettings()

publicUnaryCallSettings<DeleteApplicationRequest,Operation>deleteApplicationSettings()

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

Returns
Type Description
UnaryCallSettings<DeleteApplicationRequest,Operation>

deleteServiceOperationSettings()

publicOperationCallSettings<DeleteServiceRequest,Empty,OperationMetadata>deleteServiceOperationSettings()

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

Returns
Type Description
OperationCallSettings<DeleteServiceRequest,Empty,OperationMetadata>

deleteServiceProjectAttachmentOperationSettings()

publicOperationCallSettings<DeleteServiceProjectAttachmentRequest,Empty,OperationMetadata>deleteServiceProjectAttachmentOperationSettings()

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

Returns
Type Description
OperationCallSettings<DeleteServiceProjectAttachmentRequest,Empty,OperationMetadata>

deleteServiceProjectAttachmentSettings()

publicUnaryCallSettings<DeleteServiceProjectAttachmentRequest,Operation>deleteServiceProjectAttachmentSettings()

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

Returns
Type Description
UnaryCallSettings<DeleteServiceProjectAttachmentRequest,Operation>

deleteServiceSettings()

publicUnaryCallSettings<DeleteServiceRequest,Operation>deleteServiceSettings()

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

Returns
Type Description
UnaryCallSettings<DeleteServiceRequest,Operation>

deleteWorkloadOperationSettings()

publicOperationCallSettings<DeleteWorkloadRequest,Empty,OperationMetadata>deleteWorkloadOperationSettings()

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

Returns
Type Description
OperationCallSettings<DeleteWorkloadRequest,Empty,OperationMetadata>

deleteWorkloadSettings()

publicUnaryCallSettings<DeleteWorkloadRequest,Operation>deleteWorkloadSettings()

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

Returns
Type Description
UnaryCallSettings<DeleteWorkloadRequest,Operation>

detachServiceProjectAttachmentSettings()

publicUnaryCallSettings<DetachServiceProjectAttachmentRequest,DetachServiceProjectAttachmentResponse>detachServiceProjectAttachmentSettings()

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

Returns
Type Description
UnaryCallSettings<DetachServiceProjectAttachmentRequest,DetachServiceProjectAttachmentResponse>

getApplicationSettings()

publicUnaryCallSettings<GetApplicationRequest,Application>getApplicationSettings()

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

Returns
Type Description
UnaryCallSettings<GetApplicationRequest,Application>

getDiscoveredServiceSettings()

publicUnaryCallSettings<GetDiscoveredServiceRequest,DiscoveredService>getDiscoveredServiceSettings()

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

Returns
Type Description
UnaryCallSettings<GetDiscoveredServiceRequest,DiscoveredService>

getDiscoveredWorkloadSettings()

publicUnaryCallSettings<GetDiscoveredWorkloadRequest,DiscoveredWorkload>getDiscoveredWorkloadSettings()

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

Returns
Type Description
UnaryCallSettings<GetDiscoveredWorkloadRequest,DiscoveredWorkload>

getIamPolicySettings()

publicUnaryCallSettings<GetIamPolicyRequest,Policy>getIamPolicySettings()

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

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

getLocationSettings()

publicUnaryCallSettings<GetLocationRequest,Location>getLocationSettings()

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

Returns
Type Description
UnaryCallSettings<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getServiceName()

publicStringgetServiceName()

Returns the default service name.

Returns
Type Description
String
Overrides

getServiceProjectAttachmentSettings()

publicUnaryCallSettings<GetServiceProjectAttachmentRequest,ServiceProjectAttachment>getServiceProjectAttachmentSettings()

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

Returns
Type Description
UnaryCallSettings<GetServiceProjectAttachmentRequest,ServiceProjectAttachment>

getServiceSettings()

publicUnaryCallSettings<GetServiceRequest,Service>getServiceSettings()

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

Returns
Type Description
UnaryCallSettings<GetServiceRequest,Service>

getWorkloadSettings()

publicUnaryCallSettings<GetWorkloadRequest,Workload>getWorkloadSettings()

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

Returns
Type Description
UnaryCallSettings<GetWorkloadRequest,Workload>

listApplicationsSettings()

publicPagedCallSettings<ListApplicationsRequest,ListApplicationsResponse,AppHubClient.ListApplicationsPagedResponse>listApplicationsSettings()

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

Returns
Type Description
PagedCallSettings<ListApplicationsRequest,ListApplicationsResponse,ListApplicationsPagedResponse>

listDiscoveredServicesSettings()

publicPagedCallSettings<ListDiscoveredServicesRequest,ListDiscoveredServicesResponse,AppHubClient.ListDiscoveredServicesPagedResponse>listDiscoveredServicesSettings()

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

Returns
Type Description
PagedCallSettings<ListDiscoveredServicesRequest,ListDiscoveredServicesResponse,ListDiscoveredServicesPagedResponse>

listDiscoveredWorkloadsSettings()

publicPagedCallSettings<ListDiscoveredWorkloadsRequest,ListDiscoveredWorkloadsResponse,AppHubClient.ListDiscoveredWorkloadsPagedResponse>listDiscoveredWorkloadsSettings()

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

Returns
Type Description
PagedCallSettings<ListDiscoveredWorkloadsRequest,ListDiscoveredWorkloadsResponse,ListDiscoveredWorkloadsPagedResponse>

listLocationsSettings()

publicPagedCallSettings<ListLocationsRequest,ListLocationsResponse,AppHubClient.ListLocationsPagedResponse>listLocationsSettings()

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

Returns
Type Description
PagedCallSettings<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse,ListLocationsPagedResponse>

listServiceProjectAttachmentsSettings()

publicPagedCallSettings<ListServiceProjectAttachmentsRequest,ListServiceProjectAttachmentsResponse,AppHubClient.ListServiceProjectAttachmentsPagedResponse>listServiceProjectAttachmentsSettings()

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

Returns
Type Description
PagedCallSettings<ListServiceProjectAttachmentsRequest,ListServiceProjectAttachmentsResponse,ListServiceProjectAttachmentsPagedResponse>

listServicesSettings()

publicPagedCallSettings<ListServicesRequest,ListServicesResponse,AppHubClient.ListServicesPagedResponse>listServicesSettings()

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

Returns
Type Description
PagedCallSettings<ListServicesRequest,ListServicesResponse,ListServicesPagedResponse>

listWorkloadsSettings()

publicPagedCallSettings<ListWorkloadsRequest,ListWorkloadsResponse,AppHubClient.ListWorkloadsPagedResponse>listWorkloadsSettings()

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

Returns
Type Description
PagedCallSettings<ListWorkloadsRequest,ListWorkloadsResponse,ListWorkloadsPagedResponse>

lookupDiscoveredServiceSettings()

publicUnaryCallSettings<LookupDiscoveredServiceRequest,LookupDiscoveredServiceResponse>lookupDiscoveredServiceSettings()

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

Returns
Type Description
UnaryCallSettings<LookupDiscoveredServiceRequest,LookupDiscoveredServiceResponse>

lookupDiscoveredWorkloadSettings()

publicUnaryCallSettings<LookupDiscoveredWorkloadRequest,LookupDiscoveredWorkloadResponse>lookupDiscoveredWorkloadSettings()

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

Returns
Type Description
UnaryCallSettings<LookupDiscoveredWorkloadRequest,LookupDiscoveredWorkloadResponse>

lookupServiceProjectAttachmentSettings()

publicUnaryCallSettings<LookupServiceProjectAttachmentRequest,LookupServiceProjectAttachmentResponse>lookupServiceProjectAttachmentSettings()

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

Returns
Type Description
UnaryCallSettings<LookupServiceProjectAttachmentRequest,LookupServiceProjectAttachmentResponse>

setIamPolicySettings()

publicUnaryCallSettings<SetIamPolicyRequest,Policy>setIamPolicySettings()

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

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

testIamPermissionsSettings()

publicUnaryCallSettings<TestIamPermissionsRequest,TestIamPermissionsResponse>testIamPermissionsSettings()

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

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

toBuilder()

publicAppHubStubSettings.BuildertoBuilder()

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

Returns
Type Description
AppHubStubSettings.Builder
Overrides

updateApplicationOperationSettings()

publicOperationCallSettings<UpdateApplicationRequest,Application,OperationMetadata>updateApplicationOperationSettings()

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

Returns
Type Description
OperationCallSettings<UpdateApplicationRequest,Application,OperationMetadata>

updateApplicationSettings()

publicUnaryCallSettings<UpdateApplicationRequest,Operation>updateApplicationSettings()

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

Returns
Type Description
UnaryCallSettings<UpdateApplicationRequest,Operation>

updateServiceOperationSettings()

publicOperationCallSettings<UpdateServiceRequest,Service,OperationMetadata>updateServiceOperationSettings()

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

Returns
Type Description
OperationCallSettings<UpdateServiceRequest,Service,OperationMetadata>

updateServiceSettings()

publicUnaryCallSettings<UpdateServiceRequest,Operation>updateServiceSettings()

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

Returns
Type Description
UnaryCallSettings<UpdateServiceRequest,Operation>

updateWorkloadOperationSettings()

publicOperationCallSettings<UpdateWorkloadRequest,Workload,OperationMetadata>updateWorkloadOperationSettings()

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

Returns
Type Description
OperationCallSettings<UpdateWorkloadRequest,Workload,OperationMetadata>

updateWorkloadSettings()

publicUnaryCallSettings<UpdateWorkloadRequest,Operation>updateWorkloadSettings()

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

Returns
Type Description
UnaryCallSettings<UpdateWorkloadRequest,Operation>

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.