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 with 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 for UNARY and SERVER_STREAMING , which do not permit the
client to stream. |
boolean |
serverSendsOneMessage()
Returns
true for UNARY and CLIENT_STREAMING , which do not permit the
server to stream. |
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
for UNARY
and SERVER_STREAMING
, which do not permit the
client to stream.public final boolean serverSendsOneMessage()
true
for UNARY
and CLIENT_STREAMING
, which do not permit the
server to stream.