Class HttpJsonStreamingServiceStub (0.10.0)

public class HttpJsonStreamingServiceStub extends StreamingServiceStub

REST stub implementation for the StreamingService service API.

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

Inheritance

java.lang.Object > StreamingServiceStub > HttpJsonStreamingServiceStub

Static Methods

create(ClientContext clientContext)

public static final HttpJsonStreamingServiceStub create(ClientContext clientContext)
Parameter
Name Description
clientContext ClientContext
Returns
Type Description
HttpJsonStreamingServiceStub
Exceptions
Type Description
IOException

create(ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)

public static final HttpJsonStreamingServiceStub create(ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)
Parameters
Name Description
clientContext ClientContext
callableFactory HttpJsonStubCallableFactory
Returns
Type Description
HttpJsonStreamingServiceStub
Exceptions
Type Description
IOException

create(StreamingServiceStubSettings settings)

public static final HttpJsonStreamingServiceStub create(StreamingServiceStubSettings settings)
Parameter
Name Description
settings StreamingServiceStubSettings
Returns
Type Description
HttpJsonStreamingServiceStub
Exceptions
Type Description
IOException

getMethodDescriptors()

public static List<ApiMethodDescriptor> getMethodDescriptors()
Returns
Type Description
List<ApiMethodDescriptor>

Constructors

HttpJsonStreamingServiceStub(StreamingServiceStubSettings settings, ClientContext clientContext)

protected HttpJsonStreamingServiceStub(StreamingServiceStubSettings settings, ClientContext clientContext)

Constructs an instance of HttpJsonStreamingServiceStub, 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 StreamingServiceStubSettings
clientContext ClientContext

HttpJsonStreamingServiceStub(StreamingServiceStubSettings settings, ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)

protected HttpJsonStreamingServiceStub(StreamingServiceStubSettings settings, ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)

Constructs an instance of HttpJsonStreamingServiceStub, 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 StreamingServiceStubSettings
clientContext ClientContext
callableFactory HttpJsonStubCallableFactory

Methods

acquireLeaseCallable()

public UnaryCallable<AcquireLeaseRequest,Lease> acquireLeaseCallable()
Returns
Type Description
UnaryCallable<AcquireLeaseRequest,Lease>
Overrides

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()
Overrides

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

receiveEventsCallable()

public BidiStreamingCallable<ReceiveEventsRequest,ReceiveEventsResponse> receiveEventsCallable()
Returns
Type Description
BidiStreamingCallable<ReceiveEventsRequest,ReceiveEventsResponse>
Overrides

receivePacketsCallable()

public BidiStreamingCallable<ReceivePacketsRequest,ReceivePacketsResponse> receivePacketsCallable()
Returns
Type Description
BidiStreamingCallable<ReceivePacketsRequest,ReceivePacketsResponse>
Overrides

releaseLeaseCallable()

public UnaryCallable<ReleaseLeaseRequest,ReleaseLeaseResponse> releaseLeaseCallable()
Returns
Type Description
UnaryCallable<ReleaseLeaseRequest,ReleaseLeaseResponse>
Overrides

renewLeaseCallable()

public UnaryCallable<RenewLeaseRequest,Lease> renewLeaseCallable()
Returns
Type Description
UnaryCallable<RenewLeaseRequest,Lease>
Overrides

sendPacketsCallable()

public BidiStreamingCallable<SendPacketsRequest,SendPacketsResponse> sendPacketsCallable()
Returns
Type Description
BidiStreamingCallable<SendPacketsRequest,SendPacketsResponse>
Overrides

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()