Class GrpcSpeechStub (4.9.0)

public class GrpcSpeechStub extends SpeechStub

gRPC stub implementation for the Speech service API.

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

Inheritance

java.lang.Object > SpeechStub > GrpcSpeechStub

Static Methods

create(ClientContext clientContext)

public static final GrpcSpeechStub create(ClientContext clientContext)
Parameter
NameDescription
clientContextClientContext
Returns
TypeDescription
GrpcSpeechStub
Exceptions
TypeDescription
IOException

create(ClientContext clientContext, GrpcStubCallableFactory callableFactory)

public static final GrpcSpeechStub create(ClientContext clientContext, GrpcStubCallableFactory callableFactory)
Parameters
NameDescription
clientContextClientContext
callableFactoryGrpcStubCallableFactory
Returns
TypeDescription
GrpcSpeechStub
Exceptions
TypeDescription
IOException

create(SpeechStubSettings settings)

public static final GrpcSpeechStub create(SpeechStubSettings settings)
Parameter
NameDescription
settingsSpeechStubSettings
Returns
TypeDescription
GrpcSpeechStub
Exceptions
TypeDescription
IOException

Constructors

GrpcSpeechStub(SpeechStubSettings settings, ClientContext clientContext)

protected GrpcSpeechStub(SpeechStubSettings settings, ClientContext clientContext)

Constructs an instance of GrpcSpeechStub, 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
NameDescription
settingsSpeechStubSettings
clientContextClientContext

GrpcSpeechStub(SpeechStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory)

protected GrpcSpeechStub(SpeechStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory)

Constructs an instance of GrpcSpeechStub, 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
NameDescription
settingsSpeechStubSettings
clientContextClientContext
callableFactoryGrpcStubCallableFactory

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

close()

public final void close()
Overrides

getOperationsStub()

public GrpcOperationsStub getOperationsStub()
Returns
TypeDescription
GrpcOperationsStub
Overrides

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

longRunningRecognizeCallable()

public UnaryCallable<LongRunningRecognizeRequest,Operation> longRunningRecognizeCallable()
Returns
TypeDescription
UnaryCallable<LongRunningRecognizeRequest,Operation>
Overrides

longRunningRecognizeOperationCallable()

public OperationCallable<LongRunningRecognizeRequest,LongRunningRecognizeResponse,LongRunningRecognizeMetadata> longRunningRecognizeOperationCallable()
Returns
TypeDescription
OperationCallable<LongRunningRecognizeRequest,LongRunningRecognizeResponse,LongRunningRecognizeMetadata>
Overrides

recognizeCallable()

public UnaryCallable<RecognizeRequest,RecognizeResponse> recognizeCallable()
Returns
TypeDescription
UnaryCallable<RecognizeRequest,RecognizeResponse>
Overrides

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

streamingRecognizeCallable()

public BidiStreamingCallable<StreamingRecognizeRequest,StreamingRecognizeResponse> streamingRecognizeCallable()
Returns
TypeDescription
BidiStreamingCallable<StreamingRecognizeRequest,StreamingRecognizeResponse>
Overrides