public static enum MethodDescriptor.MethodType extends Enum<MethodDescriptor.MethodType>
Enum Constant and Description |
---|
BIDI_STREAMING
Zero or more request and response messages arbitrarily interleaved in time.
|
CLIENT_STREAMING
Zero or more request messages followed by one response message.
|
SERVER_STREAMING
One request message followed by zero or more response messages.
|
UNARY
One request message followed by one response message.
|
UNKNOWN
Cardinality and temporal relationships are not known.
|
Modifier and Type | Method and Description |
---|---|
boolean |
clientSendsOneMessage()
Returns
true if the client will immediately send one request message to the server
after calling ClientCall.start(io.grpc.ClientCall.Listener, io.grpc.Metadata)
and then immediately half-close the stream by calling ClientCall.halfClose() . |
boolean |
serverSendsOneMessage()
Returns
true if the server will immediately send one response message to the client
upon receipt of ServerCall.Listener.onHalfClose() and then immediately
close the stream by calling ServerCall.close(Status, io.grpc.Metadata) . |
static MethodDescriptor.MethodType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MethodDescriptor.MethodType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MethodDescriptor.MethodType UNARY
public static final MethodDescriptor.MethodType CLIENT_STREAMING
public static final MethodDescriptor.MethodType SERVER_STREAMING
public static final MethodDescriptor.MethodType BIDI_STREAMING
public static final MethodDescriptor.MethodType UNKNOWN
BIDI_STREAMING
.public static MethodDescriptor.MethodType[] values()
for (MethodDescriptor.MethodType c : MethodDescriptor.MethodType.values()) System.out.println(c);
public static MethodDescriptor.MethodType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final boolean clientSendsOneMessage()
true
if the client will immediately send one request message to the server
after calling ClientCall.start(io.grpc.ClientCall.Listener, io.grpc.Metadata)
and then immediately half-close the stream by calling ClientCall.halfClose()
.public final boolean serverSendsOneMessage()
true
if the server will immediately send one response message to the client
upon receipt of ServerCall.Listener.onHalfClose()
and then immediately
close the stream by calling ServerCall.close(Status, io.grpc.Metadata)
.