Class HttpJsonServiceUsageStub (2.21.0)

publicclass HttpJsonServiceUsageStubextendsServiceUsageStub

REST stub implementation for the ServiceUsage service API.

This class is for advanced usage and reflects the underlying API directly.

Inheritance

java.lang.Object > ServiceUsageStub > HttpJsonServiceUsageStub

Static Methods

create(ClientContext clientContext)

publicstaticfinalHttpJsonServiceUsageStubcreate(ClientContextclientContext)
Parameter
Name Description
clientContext ClientContext
Returns
Type Description
HttpJsonServiceUsageStub
Exceptions
Type Description
IOException

create(ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)

publicstaticfinalHttpJsonServiceUsageStubcreate(ClientContextclientContext,HttpJsonStubCallableFactorycallableFactory)
Parameters
Name Description
clientContext ClientContext
callableFactory HttpJsonStubCallableFactory
Returns
Type Description
HttpJsonServiceUsageStub
Exceptions
Type Description
IOException

create(ServiceUsageStubSettings settings)

publicstaticfinalHttpJsonServiceUsageStubcreate(ServiceUsageStubSettingssettings)
Parameter
Name Description
settings ServiceUsageStubSettings
Returns
Type Description
HttpJsonServiceUsageStub
Exceptions
Type Description
IOException

getMethodDescriptors()

publicstaticList<ApiMethodDescriptor>getMethodDescriptors()
Returns
Type Description
List<ApiMethodDescriptor>

Constructors

HttpJsonServiceUsageStub(ServiceUsageStubSettings settings, ClientContext clientContext)

protectedHttpJsonServiceUsageStub(ServiceUsageStubSettingssettings,ClientContextclientContext)

Constructs an instance of HttpJsonServiceUsageStub, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameters
Name Description
settings ServiceUsageStubSettings
clientContext ClientContext

HttpJsonServiceUsageStub(ServiceUsageStubSettings settings, ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)

protectedHttpJsonServiceUsageStub(ServiceUsageStubSettingssettings,ClientContextclientContext,HttpJsonStubCallableFactorycallableFactory)

Constructs an instance of HttpJsonServiceUsageStub, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameters
Name Description
settings ServiceUsageStubSettings
clientContext ClientContext
callableFactory HttpJsonStubCallableFactory

Methods

awaitTermination(long duration, TimeUnit unit)

publicbooleanawaitTermination(longduration,TimeUnitunit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

batchEnableServicesCallable()

publicUnaryCallable<BatchEnableServicesRequest,Operation>batchEnableServicesCallable()
Returns
Type Description
UnaryCallable<BatchEnableServicesRequest,Operation>
Overrides

batchEnableServicesOperationCallable()

publicOperationCallable<BatchEnableServicesRequest,BatchEnableServicesResponse,OperationMetadata>batchEnableServicesOperationCallable()
Returns
Type Description
OperationCallable<BatchEnableServicesRequest,BatchEnableServicesResponse,OperationMetadata>
Overrides

batchGetServicesCallable()

publicUnaryCallable<BatchGetServicesRequest,BatchGetServicesResponse>batchGetServicesCallable()
Returns
Type Description
UnaryCallable<BatchGetServicesRequest,BatchGetServicesResponse>
Overrides

close()

publicfinalvoidclose()
Overrides

disableServiceCallable()

publicUnaryCallable<DisableServiceRequest,Operation>disableServiceCallable()
Returns
Type Description
UnaryCallable<DisableServiceRequest,Operation>
Overrides

disableServiceOperationCallable()

publicOperationCallable<DisableServiceRequest,DisableServiceResponse,OperationMetadata>disableServiceOperationCallable()
Returns
Type Description
OperationCallable<DisableServiceRequest,DisableServiceResponse,OperationMetadata>
Overrides

enableServiceCallable()

publicUnaryCallable<EnableServiceRequest,Operation>enableServiceCallable()
Returns
Type Description
UnaryCallable<EnableServiceRequest,Operation>
Overrides

enableServiceOperationCallable()

publicOperationCallable<EnableServiceRequest,EnableServiceResponse,OperationMetadata>enableServiceOperationCallable()
Returns
Type Description
OperationCallable<EnableServiceRequest,EnableServiceResponse,OperationMetadata>
Overrides

getHttpJsonOperationsStub()

publicHttpJsonOperationsStubgetHttpJsonOperationsStub()
Returns
Type Description
HttpJsonOperationsStub
Overrides

getServiceCallable()

publicUnaryCallable<GetServiceRequest,Service>getServiceCallable()
Returns
Type Description
UnaryCallable<GetServiceRequest,Service>
Overrides

isShutdown()

publicbooleanisShutdown()
Returns
Type Description
boolean

isTerminated()

publicbooleanisTerminated()
Returns
Type Description
boolean

listServicesCallable()

publicUnaryCallable<ListServicesRequest,ListServicesResponse>listServicesCallable()
Returns
Type Description
UnaryCallable<ListServicesRequest,ListServicesResponse>
Overrides

listServicesPagedCallable()

publicUnaryCallable<ListServicesRequest,ServiceUsageClient.ListServicesPagedResponse>listServicesPagedCallable()
Returns
Type Description
UnaryCallable<ListServicesRequest,ListServicesPagedResponse>
Overrides

shutdown()

publicvoidshutdown()

shutdownNow()

publicvoidshutdownNow()

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.