public enum MethodType extends Enum<MethodType>
Enum Constant and Description |
---|
CLIENT_STREAMING
Zero or more request messages followed by one response message.
|
DUPLEX_STREAMING
Zero or more request and response messages arbitrarily interleaved in time.
|
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 Call.start(io.grpc.Call.Listener, io.grpc.Metadata.Headers) and then
immediately half-close the stream by calling Call.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.Trailers) . |
static MethodType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MethodType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MethodType UNARY
public static final MethodType CLIENT_STREAMING
public static final MethodType SERVER_STREAMING
public static final MethodType DUPLEX_STREAMING
public static final MethodType UNKNOWN
DUPLEX_STREAMING
.public static MethodType[] values()
for (MethodType c : MethodType.values()) System.out.println(c);
public static 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 Call.start(io.grpc.Call.Listener, io.grpc.Metadata.Headers)
and then
immediately half-close the stream by calling Call.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.Trailers)
.