Package io.grpc
Enum Class MethodDescriptor.MethodType
- All Implemented Interfaces:
Serializable
,Comparable<MethodDescriptor.MethodType>
,Constable
- Enclosing class:
MethodDescriptor<ReqT,
RespT>
The call type of a method.
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
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. -
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 class with the specified name.static MethodDescriptor.MethodType[]
values()
Returns an array containing the constants of this enum class, 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
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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
-