Class GrpcPredictionServiceStub (0.1.0)

publicclass GrpcPredictionServiceStubextendsPredictionServiceStub

gRPC stub implementation for the PredictionService service API.

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

Inheritance

PredictionServiceStub > java.lang.Object > GrpcPredictionServiceStub

Inherited Members

Static Methods

create(ClientContext clientContext)

publicstaticfinalGrpcPredictionServiceStubcreate(ClientContextclientContext)
Parameter
Name Description
clientContext ClientContext
Returns
Type Description
GrpcPredictionServiceStub
Exceptions
Type Description
IOException

create(ClientContext clientContext, GrpcStubCallableFactory callableFactory)

publicstaticfinalGrpcPredictionServiceStubcreate(ClientContextclientContext,GrpcStubCallableFactorycallableFactory)
Parameters
Name Description
clientContext ClientContext
callableFactory GrpcStubCallableFactory
Returns
Type Description
GrpcPredictionServiceStub
Exceptions
Type Description
IOException

create(PredictionServiceStubSettings settings)

publicstaticfinalGrpcPredictionServiceStubcreate(PredictionServiceStubSettingssettings)
Parameter
Name Description
settings PredictionServiceStubSettings
Returns
Type Description
GrpcPredictionServiceStub
Exceptions
Type Description
IOException

Constructors

GrpcPredictionServiceStub(PredictionServiceStubSettings settings, ClientContext clientContext)

protectedGrpcPredictionServiceStub(PredictionServiceStubSettingssettings,ClientContextclientContext)

Constructs an instance of GrpcPredictionServiceStub, 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 PredictionServiceStubSettings
clientContext ClientContext

GrpcPredictionServiceStub(PredictionServiceStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory)

protectedGrpcPredictionServiceStub(PredictionServiceStubSettingssettings,ClientContextclientContext,GrpcStubCallableFactorycallableFactory)

Constructs an instance of GrpcPredictionServiceStub, 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 PredictionServiceStubSettings
clientContext ClientContext
callableFactory GrpcStubCallableFactory

Methods

awaitTermination(long duration, TimeUnit unit)

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

close()

publicfinalvoidclose()
Overrides

countTokensCallable()

publicUnaryCallable<CountTokensRequest,CountTokensResponse>countTokensCallable()
Returns
Type Description
UnaryCallable<CountTokensRequest,CountTokensResponse>
Overrides

directPredictCallable()

publicUnaryCallable<DirectPredictRequest,DirectPredictResponse>directPredictCallable()
Returns
Type Description
UnaryCallable<DirectPredictRequest,DirectPredictResponse>
Overrides

directRawPredictCallable()

publicUnaryCallable<DirectRawPredictRequest,DirectRawPredictResponse>directRawPredictCallable()
Returns
Type Description
UnaryCallable<DirectRawPredictRequest,DirectRawPredictResponse>
Overrides

explainCallable()

publicUnaryCallable<ExplainRequest,ExplainResponse>explainCallable()
Returns
Type Description
UnaryCallable<ExplainRequest,ExplainResponse>
Overrides

getIamPolicyCallable()

publicUnaryCallable<GetIamPolicyRequest,Policy>getIamPolicyCallable()
Returns
Type Description
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>
Overrides

getLocationCallable()

publicUnaryCallable<GetLocationRequest,Location>getLocationCallable()
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>
Overrides

getOperationsStub()

publicGrpcOperationsStubgetOperationsStub()
Returns
Type Description
GrpcOperationsStub

isShutdown()

publicbooleanisShutdown()
Returns
Type Description
boolean

isTerminated()

publicbooleanisTerminated()
Returns
Type Description
boolean

listLocationsCallable()

publicUnaryCallable<ListLocationsRequest,ListLocationsResponse>listLocationsCallable()
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>
Overrides

listLocationsPagedCallable()

publicUnaryCallable<ListLocationsRequest,PredictionServiceClient.ListLocationsPagedResponse>listLocationsPagedCallable()
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>
Overrides

predictCallable()

publicUnaryCallable<PredictRequest,PredictResponse>predictCallable()
Returns
Type Description
UnaryCallable<PredictRequest,PredictResponse>
Overrides

rawPredictCallable()

publicUnaryCallable<RawPredictRequest,HttpBody>rawPredictCallable()
Returns
Type Description
UnaryCallable<RawPredictRequest,com.google.api.HttpBody>
Overrides

serverStreamingPredictCallable()

publicServerStreamingCallable<StreamingPredictRequest,StreamingPredictResponse>serverStreamingPredictCallable()
Returns
Type Description
ServerStreamingCallable<StreamingPredictRequest,StreamingPredictResponse>
Overrides

setIamPolicyCallable()

publicUnaryCallable<SetIamPolicyRequest,Policy>setIamPolicyCallable()
Returns
Type Description
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>
Overrides

shutdown()

publicvoidshutdown()

shutdownNow()

publicvoidshutdownNow()

streamGenerateContentCallable()

publicServerStreamingCallable<GenerateContentRequest,GenerateContentResponse>streamGenerateContentCallable()
Returns
Type Description
ServerStreamingCallable<GenerateContentRequest,GenerateContentResponse>
Overrides

streamingPredictCallable()

publicBidiStreamingCallable<StreamingPredictRequest,StreamingPredictResponse>streamingPredictCallable()
Returns
Type Description
BidiStreamingCallable<StreamingPredictRequest,StreamingPredictResponse>
Overrides

streamingRawPredictCallable()

publicBidiStreamingCallable<StreamingRawPredictRequest,StreamingRawPredictResponse>streamingRawPredictCallable()
Returns
Type Description
BidiStreamingCallable<StreamingRawPredictRequest,StreamingRawPredictResponse>
Overrides

testIamPermissionsCallable()

publicUnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse>testIamPermissionsCallable()
Returns
Type Description
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>
Overrides

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.