Top Description Inners Constructors Methods
io.grpc

public abstract Class ServerStreamTracer

extends StreamTracer
Class Inheritance
Annotations
@ExperimentalApi:https://github.com/grpc/grpc-java/issues/2861
@ThreadSafe
Imports
javax.annotation.Nullable, javax.annotation.concurrent.ThreadSafe

Listens to events on a stream to collect metrics.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
private static class
ServerStreamTracer.ReadOnlyServerCall<ReqT, RespT>

Deprecated Will be deleted when serverCallStarted(ServerCall) is removed.
This class exists solely to help transition to the ServerCallInfo based API.
public abstract static class
ServerStreamTracer.ServerCallInfo<ReqT, RespT>

A data class with info about the started ServerCall.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Context
filterContext(Context context)

Called before the interceptors and the call handlers and make changes to the Context object if needed.

public void
serverCallStarted(ServerStreamTracer.ServerCallInfo<?, ?> callInfo)

Called when ServerCall is created.

public void
serverCallStarted(ServerCall<?, ?> call)

Deprecated Implement serverCallStarted(ServerCallInfo) instead.
Called when ServerCall is created.
Inherited from io.grpc.StreamTracer:
inboundMessageinboundMessageReadinboundUncompressedSizeinboundWireSizeoutboundMessageoutboundMessageSentoutboundUncompressedSizeoutboundWireSizestreamClosed

Constructor Detail

ServerStreamTracerback to summary
public ServerStreamTracer()

Method Detail

filterContextback to summary
public Context filterContext(Context context)

Called before the interceptors and the call handlers and make changes to the Context object if needed.

serverCallStartedback to summary
public void serverCallStarted(ServerStreamTracer.ServerCallInfo<?, ?> callInfo)

Called when ServerCall is created. This is for the tracer to access information about the ServerCall. Called after filterContext and before the application call handler.

Annotations
@SuppressWarnings:deprecation
serverCallStartedback to summary
public void serverCallStarted(ServerCall<?, ?> call)

Deprecated

Implement serverCallStarted(ServerCallInfo) instead. This method will be removed in a future release of gRPC.

Called when ServerCall is created. This is for the tracer to access information about the ServerCall. Called after filterContext and before the application call handler.

Annotations
@Deprecated
io.grpc back to summary

public abstract Class ServerStreamTracer.Factory

extends Object
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract ServerStreamTracer
newServerStreamTracer(String
the fully qualified method name
fullMethodName
,
Metadata
the received request headers. It can be safely mutated within this method. It should not be saved because it is not safe for read or write after the method returns.
headers
)

Creates a ServerStreamTracer for a new server stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Factoryback to summary
public Factory()

Method Detail

newServerStreamTracerback to summary
public abstract ServerStreamTracer newServerStreamTracer(String fullMethodName, Metadata headers)

Creates a ServerStreamTracer for a new server stream.

Called right before the stream is created

Parameters
fullMethodName:String

the fully qualified method name

headers:Metadata

the received request headers. It can be safely mutated within this method. It should not be saved because it is not safe for read or write after the method returns.

io.grpc back to summary

private final Class ServerStreamTracer.ReadOnlyServerCall<ReqT, RespT>

extends ForwardingServerCall<ReqT, RespT>
Class Inheritance
Annotations
@Deprecated

Deprecated

Will be deleted when serverCallStarted(ServerCall) is removed.

This class exists solely to help transition to the ServerCallInfo based API.

Field Summary

Modifier and TypeField and Description
private final ServerStreamTracer.ServerCallInfo<ReqT, RespT>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static <ReqT, RespT> ServerStreamTracer.ReadOnlyServerCall<ReqT, RespT>
create(ServerStreamTracer.ServerCallInfo<ReqT, RespT> callInfo)

Deprecated as a consequence of ServerStreamTracer.ReadOnlyServerCall being deprecated.
protected ServerCall<ReqT, RespT>
delegate()

Implements abstract io.grpc.ForwardingServerCall.delegate.

Returns the delegated ServerCall.
public Attributes
getAttributes()

Overrides io.grpc.PartialForwardingServerCall.getAttributes.

Returns properties of a single call.
public String
getAuthority()

Overrides io.grpc.PartialForwardingServerCall.getAuthority.

Gets the authority this call is addressed to.
public MethodDescriptor<ReqT, RespT>
public boolean
isCancelled()

Overrides io.grpc.PartialForwardingServerCall.isCancelled.

Returns true when the call is cancelled and the server is encouraged to abort processing to save resources, since the client will not be processing any further methods.
public boolean
isReady()

Overrides io.grpc.PartialForwardingServerCall.isReady.

If true, indicates that the call is capable of sending additional messages without requiring excessive buffering internally.
Inherited from io.grpc.ForwardingServerCall:
sendMessage

Field Detail

callInfoback to summary
private final ServerStreamTracer.ServerCallInfo<ReqT, RespT> callInfo

Constructor Detail

ReadOnlyServerCallback to summary
private ReadOnlyServerCall(ServerStreamTracer.ServerCallInfo<ReqT, RespT> callInfo)

Method Detail

createback to summary
private static <ReqT, RespT> ServerStreamTracer.ReadOnlyServerCall<ReqT, RespT> create(ServerStreamTracer.ServerCallInfo<ReqT, RespT> callInfo)

Deprecated

as a consequence of ServerStreamTracer.ReadOnlyServerCall being deprecated. See corresponding docs for further information.

delegateback to summary
protected ServerCall<ReqT, RespT> delegate()

Implements abstract io.grpc.ForwardingServerCall.delegate.

Doc from io.grpc.ForwardingServerCall.delegate.

Returns the delegated ServerCall.

Annotations
@Override
getAttributesback to summary
public Attributes getAttributes()

Overrides io.grpc.PartialForwardingServerCall.getAttributes.

Doc from io.grpc.ServerCall.getAttributes.

Returns properties of a single call.

Attributes originate from the transport and can be altered by ServerTransportFilter.

Returns:Attributes

non-null Attributes container

Annotations
@Override
getAuthorityback to summary
public String getAuthority()

Overrides io.grpc.PartialForwardingServerCall.getAuthority.

Doc from io.grpc.ServerCall.getAuthority.

Gets the authority this call is addressed to.

Returns:String

the authority string. null if not available.

Annotations
@Override
getMethodDescriptorback to summary
public MethodDescriptor<ReqT, RespT> getMethodDescriptor()

Overrides io.grpc.ForwardingServerCall.getMethodDescriptor.

Doc from io.grpc.ServerCall.getMethodDescriptor.

The MethodDescriptor for the call.

Annotations
@Override
isCancelledback to summary
public boolean isCancelled()

Overrides io.grpc.PartialForwardingServerCall.isCancelled.

Doc from io.grpc.ServerCall.isCancelled.

Returns true when the call is cancelled and the server is encouraged to abort processing to save resources, since the client will not be processing any further methods. Cancellations can be caused by timeouts, explicit cancel by client, network errors, and similar.

This method may safely be called concurrently from multiple threads.

Annotations
@Override
isReadyback to summary
public boolean isReady()

Overrides io.grpc.PartialForwardingServerCall.isReady.

Doc from io.grpc.ServerCall.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.

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

Annotations
@Override
io.grpc back to summary

public abstract Class ServerStreamTracer.ServerCallInfo<ReqT, RespT>

extends Object
Class Inheritance

A data class with info about the started ServerCall.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract Attributes
public abstract String
public abstract MethodDescriptor<ReqT, RespT>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ServerCallInfoback to summary
public ServerCallInfo()

Method Detail

getAttributesback to summary
public abstract Attributes getAttributes()
getAuthorityback to summary
public abstract String getAuthority()
Annotations
@Nullable
getMethodDescriptorback to summary
public abstract MethodDescriptor<ReqT, RespT> getMethodDescriptor()