Class HttpJsonPredictionServiceStub (1.35.0)

publicclass HttpJsonPredictionServiceStubextendsPredictionServiceStub

REST stub implementation for the PredictionService service API.

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

Inheritance

PredictionServiceStub > java.lang.Object > HttpJsonPredictionServiceStub

Inherited Members

Static Methods

create(ClientContext clientContext)

publicstaticfinalHttpJsonPredictionServiceStubcreate(ClientContextclientContext)
Parameter
Name Description
clientContext ClientContext
Returns
Type Description
HttpJsonPredictionServiceStub
Exceptions
Type Description
IOException

create(ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)

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

create(PredictionServiceStubSettings settings)

publicstaticfinalHttpJsonPredictionServiceStubcreate(PredictionServiceStubSettingssettings)
Parameter
Name Description
settings PredictionServiceStubSettings
Returns
Type Description
HttpJsonPredictionServiceStub
Exceptions
Type Description
IOException

getMethodDescriptors()

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

Constructors

HttpJsonPredictionServiceStub(PredictionServiceStubSettings settings, ClientContext clientContext)

protectedHttpJsonPredictionServiceStub(PredictionServiceStubSettingssettings,ClientContextclientContext)

Constructs an instance of HttpJsonPredictionServiceStub, 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

HttpJsonPredictionServiceStub(PredictionServiceStubSettings settings, ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)

protectedHttpJsonPredictionServiceStub(PredictionServiceStubSettingssettings,ClientContextclientContext,HttpJsonStubCallableFactorycallableFactory)

Constructs an instance of HttpJsonPredictionServiceStub, 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 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

close()

publicfinalvoidclose()
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

generateContentCallable()

publicUnaryCallable<GenerateContentRequest,GenerateContentResponse>generateContentCallable()
Returns
Type Description
UnaryCallable<GenerateContentRequest,GenerateContentResponse>
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

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()

streamDirectPredictCallable()

publicBidiStreamingCallable<StreamDirectPredictRequest,StreamDirectPredictResponse>streamDirectPredictCallable()
Returns
Type Description
BidiStreamingCallable<StreamDirectPredictRequest,StreamDirectPredictResponse>
Overrides

streamDirectRawPredictCallable()

publicBidiStreamingCallable<StreamDirectRawPredictRequest,StreamDirectRawPredictResponse>streamDirectRawPredictCallable()
Returns
Type Description
BidiStreamingCallable<StreamDirectRawPredictRequest,StreamDirectRawPredictResponse>
Overrides

streamGenerateContentCallable()

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

streamRawPredictCallable()

publicServerStreamingCallable<StreamRawPredictRequest,HttpBody>streamRawPredictCallable()
Returns
Type Description
ServerStreamingCallable<StreamRawPredictRequest,com.google.api.HttpBody>
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.