Class HttpJsonLanguageServiceStub (2.30.0)

public class HttpJsonLanguageServiceStub extends LanguageServiceStub

REST stub implementation for the LanguageService service API.

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

Inheritance

java.lang.Object > LanguageServiceStub > HttpJsonLanguageServiceStub

Static Methods

create(ClientContext clientContext)

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

create(ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)

public static final HttpJsonLanguageServiceStub create(ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)
Parameters
NameDescription
clientContextClientContext
callableFactoryHttpJsonStubCallableFactory
Returns
TypeDescription
HttpJsonLanguageServiceStub
Exceptions
TypeDescription
IOException

create(LanguageServiceStubSettings settings)

public static final HttpJsonLanguageServiceStub create(LanguageServiceStubSettings settings)
Parameter
NameDescription
settingsLanguageServiceStubSettings
Returns
TypeDescription
HttpJsonLanguageServiceStub
Exceptions
TypeDescription
IOException

getMethodDescriptors()

public static List<ApiMethodDescriptor> getMethodDescriptors()
Returns
TypeDescription
List<ApiMethodDescriptor>

Constructors

HttpJsonLanguageServiceStub(LanguageServiceStubSettings settings, ClientContext clientContext)

protected HttpJsonLanguageServiceStub(LanguageServiceStubSettings settings, ClientContext clientContext)

Constructs an instance of HttpJsonLanguageServiceStub, 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
settingsLanguageServiceStubSettings
clientContextClientContext

HttpJsonLanguageServiceStub(LanguageServiceStubSettings settings, ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)

protected HttpJsonLanguageServiceStub(LanguageServiceStubSettings settings, ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)

Constructs an instance of HttpJsonLanguageServiceStub, 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
settingsLanguageServiceStubSettings
clientContextClientContext
callableFactoryHttpJsonStubCallableFactory

Methods

analyzeEntitiesCallable()

public UnaryCallable<AnalyzeEntitiesRequest,AnalyzeEntitiesResponse> analyzeEntitiesCallable()
Returns
TypeDescription
UnaryCallable<AnalyzeEntitiesRequest,AnalyzeEntitiesResponse>
Overrides

analyzeSentimentCallable()

public UnaryCallable<AnalyzeSentimentRequest,AnalyzeSentimentResponse> analyzeSentimentCallable()
Returns
TypeDescription
UnaryCallable<AnalyzeSentimentRequest,AnalyzeSentimentResponse>
Overrides

annotateTextCallable()

public UnaryCallable<AnnotateTextRequest,AnnotateTextResponse> annotateTextCallable()
Returns
TypeDescription
UnaryCallable<AnnotateTextRequest,AnnotateTextResponse>
Overrides

awaitTermination(long duration, TimeUnit unit)

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

classifyTextCallable()

public UnaryCallable<ClassifyTextRequest,ClassifyTextResponse> classifyTextCallable()
Returns
TypeDescription
UnaryCallable<ClassifyTextRequest,ClassifyTextResponse>
Overrides

close()

public final void close()
Overrides

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

moderateTextCallable()

public UnaryCallable<ModerateTextRequest,ModerateTextResponse> moderateTextCallable()
Returns
TypeDescription
UnaryCallable<ModerateTextRequest,ModerateTextResponse>
Overrides

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()