Starting with version 2.3.0, RPC implementations should not try to build on this, but should instead provide code generator plugins which generate code specific to the particular RPC implementation. This way the generated code can be more appropriate for the implementation in use and can avoid unnecessary layers of indirection.
| Modifier and Type | Method and Description |
|---|---|
| public void | callMethod(Descriptors.
Call a method of the service specified by MethodDescriptor. |
| public Descriptors. | |
| public Message | getRequestPrototype(Descriptors.
|
| public Message | getResponsePrototype(Descriptors.
Like |
| callMethod | back to summary |
|---|---|
| public void callMethod(Descriptors. Call a method of the service specified by MethodDescriptor. This is normally implemented as a
simple Preconditions:
Postconditions:
| |
| getDescriptorForType | back to summary |
|---|---|
| public Descriptors. Get the | |
| getRequestPrototype | back to summary |
|---|---|
| public Message getRequestPrototype(Descriptors.
Example:
MethodDescriptor method =
service.getDescriptorForType().findMethodByName("Foo");
Message request =
stub.getRequestPrototype(method).newBuilderForType()
.mergeFrom(input).build();
service.callMethod(method, request, callback);
| |
| getResponsePrototype | back to summary |
|---|---|
| public Message getResponsePrototype(Descriptors. Like | |