Top Description Constructors Methods
io.grpc

pack-priv abstract Class PartialForwardingClientCall<ReqT, RespT>

extends ClientCall<ReqT, RespT>
Class Inheritance
Known Direct Subclasses
io.grpc.ForwardingClientCall
Imports
com.google.common.base.MoreObjects, javax.annotation.Nullable

A ClientCall which forwards all of its methods to another ClientCall which may have a different sendMessage() message type.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
cancel(String
if not null, will appear as the description of the CANCELLED status
message
,
Throwable
if not null, will appear as the cause of the CANCELLED status
cause
)

Implements abstract io.grpc.ClientCall.cancel.

Prevent any further processing for this ClientCall.
protected abstract ClientCall<?, ?>
delegate()

Returns the delegated ClientCall.

public Attributes
getAttributes()

Overrides io.grpc.ClientCall.getAttributes.

Returns additional properties of the call.
public void
halfClose()

Implements abstract io.grpc.ClientCall.halfClose.

Close the call for request message sending.
public boolean
isReady()

Overrides io.grpc.ClientCall.isReady.

If true, indicates that the call is capable of sending additional messages without requiring excessive buffering internally.
public void
request(int
the requested number of messages to be delivered to the listener. Must be non-negative.
numMessages
)

Implements abstract io.grpc.ClientCall.request.

Requests up to the given number of messages from the call to be delivered to Listener#onMessage(Object).
public void
setMessageCompression(boolean enabled)

Overrides io.grpc.ClientCall.setMessageCompression.

Enables per-message compression, if an encoding type has been negotiated.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from io.grpc.ClientCall:
sendMessagestart

Constructor Detail

PartialForwardingClientCallback to summary
pack-priv PartialForwardingClientCall()

Method Detail

cancelback to summary
public void cancel(String message, Throwable cause)

Implements abstract io.grpc.ClientCall.cancel.

Doc from io.grpc.ClientCall.cancel.

Prevent any further processing for this ClientCall. No further messages may be sent or will be received. The server is informed of cancellations, but may not stop processing the call. Cancellation is permitted even if previously halfClosed. Cancelling an already cancel()ed ClientCall has no effect.

No other methods on this class can be called after this method has been called.

It is recommended that at least one of the arguments to be non-null, to provide useful debug information. Both argument being null may log warnings and result in suboptimal performance. Also note that the provided information will not be sent to the server.

Parameters
message:String

if not null, will appear as the description of the CANCELLED status

cause:Throwable

if not null, will appear as the cause of the CANCELLED status

Annotations
@Override
delegateback to summary
protected abstract ClientCall<?, ?> delegate()

Returns the delegated ClientCall.

getAttributesback to summary
public Attributes getAttributes()

Overrides io.grpc.ClientCall.getAttributes.

Doc from io.grpc.ClientCall.getAttributes.

Returns additional properties of the call. May only be called after Listener#onHeaders or Listener#onClose. If called prematurely, the implementation may throw IllegalStateException or return arbitrary Attributes.

Returns:Attributes

non-null attributes

Annotations
@Override
halfCloseback to summary
public void halfClose()

Implements abstract io.grpc.ClientCall.halfClose.

Doc from io.grpc.ClientCall.halfClose.

Close the call for request message sending. Incoming response messages are unaffected. This should be called when no more messages will be sent from the client.

Annotations
@Override
isReadyback to summary
public boolean isReady()

Overrides io.grpc.ClientCall.isReady.

Doc from io.grpc.ClientCall.isReady.

If true, indicates that the call is capable of sending additional messages without requiring excessive buffering internally. This event is just a suggestion and the application is free to ignore it, however doing so may result in excessive buffering within the call.

If false, Listener#onReady() will be called after isReady() transitions to true.

If the type of the call is either MethodDescriptor.MethodType#UNARY or MethodDescriptor.MethodType#SERVER_STREAMING, this method may persistently return false. Calls that send exactly one message should not check this method.

This abstract class's implementation always returns true. Implementations generally override the method.

Annotations
@Override
requestback to summary
public void request(int numMessages)

Implements abstract io.grpc.ClientCall.request.

Doc from io.grpc.ClientCall.request.

Requests up to the given number of messages from the call to be delivered to Listener#onMessage(Object). No additional messages will be delivered.

Message delivery is guaranteed to be sequential in the order received. In addition, the listener methods will not be accessed concurrently. While it is not guaranteed that the same thread will always be used, it is guaranteed that only a single thread will access the listener at a time.

If it is desired to bypass inbound flow control, a very large number of messages can be specified (e.g. Integer#MAX_VALUE).

If called multiple times, the number of messages able to delivered will be the sum of the calls.

This method is safe to call from multiple threads without external synchronization.

Parameters
numMessages:int

the requested number of messages to be delivered to the listener. Must be non-negative.

Annotations
@Override
setMessageCompressionback to summary
public void setMessageCompression(boolean enabled)

Overrides io.grpc.ClientCall.setMessageCompression.

Doc from io.grpc.ClientCall.setMessageCompression.

Enables per-message compression, if an encoding type has been negotiated. If no message encoding has been negotiated, this is a no-op. By default per-message compression is enabled, but may not have any effect if compression is not enabled on the call.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override