Package io.grpc
Enum MethodDescriptor.MethodType
- All Implemented Interfaces:
Serializable
,Comparable<MethodDescriptor.MethodType>
- Enclosing class:
MethodDescriptor<ReqT,
RespT>
The call type of a method.
- Since:
- 1.0.0
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionZero or more request and response messages arbitrarily interleaved in time.Zero or more request messages with one response message.One request message followed by zero or more response messages.One request message followed by one response message.Cardinality and temporal relationships are not known. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Returnstrue
forUNARY
andSERVER_STREAMING
, which do not permit the client to stream.final boolean
Returnstrue
forUNARY
andCLIENT_STREAMING
, which do not permit the server to stream.static MethodDescriptor.MethodType
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.
-
Enum Constant Details
-
UNARY
One request message followed by one response message. -
CLIENT_STREAMING
Zero or more request messages with one response message. -
SERVER_STREAMING
One request message followed by zero or more response messages. -
BIDI_STREAMING
Zero or more request and response messages arbitrarily interleaved in time. -
UNKNOWN
Cardinality and temporal relationships are not known. Implementations should not make buffering assumptions and should largely treat the same asBIDI_STREAMING
.
-
-
Constructor Details
-
MethodType
private MethodType()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
clientSendsOneMessage
public final boolean clientSendsOneMessage()Returnstrue
forUNARY
andSERVER_STREAMING
, which do not permit the client to stream.- Since:
- 1.0.0
-
serverSendsOneMessage
public final boolean serverSendsOneMessage()Returnstrue
forUNARY
andCLIENT_STREAMING
, which do not permit the server to stream.- Since:
- 1.0.0
-