xref: /aosp_15_r20/external/grpc-grpc-java/README.md (revision e07d83d3ffcef9ecfc9f7f475418ec639ff0e5fe)
1*e07d83d3SAndroid Build Coastguard WorkergRPC-Java - An RPC library and framework
2*e07d83d3SAndroid Build Coastguard Worker========================================
3*e07d83d3SAndroid Build Coastguard Worker
4*e07d83d3SAndroid Build Coastguard Worker<table>
5*e07d83d3SAndroid Build Coastguard Worker  <tr>
6*e07d83d3SAndroid Build Coastguard Worker    <td><b>Homepage:</b></td>
7*e07d83d3SAndroid Build Coastguard Worker    <td><a href="https://grpc.io/">grpc.io</a></td>
8*e07d83d3SAndroid Build Coastguard Worker  </tr>
9*e07d83d3SAndroid Build Coastguard Worker  <tr>
10*e07d83d3SAndroid Build Coastguard Worker    <td><b>Mailing List:</b></td>
11*e07d83d3SAndroid Build Coastguard Worker    <td><a href="https://groups.google.com/forum/#!forum/grpc-io">[email protected]</a></td>
12*e07d83d3SAndroid Build Coastguard Worker  </tr>
13*e07d83d3SAndroid Build Coastguard Worker</table>
14*e07d83d3SAndroid Build Coastguard Worker
15*e07d83d3SAndroid Build Coastguard Worker[![Join the chat at https://gitter.im/grpc/grpc](https://badges.gitter.im/grpc/grpc.svg)](https://gitter.im/grpc/grpc?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
16*e07d83d3SAndroid Build Coastguard Worker[![Build Status](https://travis-ci.org/grpc/grpc-java.svg?branch=master)](https://travis-ci.org/grpc/grpc-java)
17*e07d83d3SAndroid Build Coastguard Worker[![Line Coverage Status](https://coveralls.io/repos/grpc/grpc-java/badge.svg?branch=master&service=github)](https://coveralls.io/github/grpc/grpc-java?branch=master)
18*e07d83d3SAndroid Build Coastguard Worker[![Branch-adjusted Line Coverage Status](https://codecov.io/gh/grpc/grpc-java/branch/master/graph/badge.svg)](https://codecov.io/gh/grpc/grpc-java)
19*e07d83d3SAndroid Build Coastguard Worker
20*e07d83d3SAndroid Build Coastguard WorkerSupported Platforms
21*e07d83d3SAndroid Build Coastguard Worker-------------------
22*e07d83d3SAndroid Build Coastguard Worker
23*e07d83d3SAndroid Build Coastguard WorkergRPC-Java supports Java 8 and later. Android minSdkVersion 19 (KitKat) and
24*e07d83d3SAndroid Build Coastguard Workerlater are supported with [Java 8 language desugaring][android-java-8].
25*e07d83d3SAndroid Build Coastguard Worker
26*e07d83d3SAndroid Build Coastguard WorkerTLS usage on Android typically requires Play Services Dynamic Security Provider.
27*e07d83d3SAndroid Build Coastguard WorkerPlease see the [Security Readme](SECURITY.md).
28*e07d83d3SAndroid Build Coastguard Worker
29*e07d83d3SAndroid Build Coastguard WorkerOlder Java versions are not directly supported, but a branch remains available
30*e07d83d3SAndroid Build Coastguard Workerfor fixes and releases. See [gRFC P5 JDK Version Support
31*e07d83d3SAndroid Build Coastguard WorkerPolicy][P5-jdk-version-support].
32*e07d83d3SAndroid Build Coastguard Worker
33*e07d83d3SAndroid Build Coastguard WorkerJava version | gRPC Branch
34*e07d83d3SAndroid Build Coastguard Worker------------ | -----------
35*e07d83d3SAndroid Build Coastguard Worker7            | 1.41.x
36*e07d83d3SAndroid Build Coastguard Worker
37*e07d83d3SAndroid Build Coastguard Worker[android-java-8]: https://developer.android.com/studio/write/java8-support#supported_features
38*e07d83d3SAndroid Build Coastguard Worker[P5-jdk-version-support]: https://github.com/grpc/proposal/blob/master/P5-jdk-version-support.md#proposal
39*e07d83d3SAndroid Build Coastguard Worker
40*e07d83d3SAndroid Build Coastguard WorkerGetting Started
41*e07d83d3SAndroid Build Coastguard Worker---------------
42*e07d83d3SAndroid Build Coastguard Worker
43*e07d83d3SAndroid Build Coastguard WorkerFor a guided tour, take a look at the [quick start
44*e07d83d3SAndroid Build Coastguard Workerguide](https://grpc.io/docs/languages/java/quickstart) or the more explanatory [gRPC
45*e07d83d3SAndroid Build Coastguard Workerbasics](https://grpc.io/docs/languages/java/basics).
46*e07d83d3SAndroid Build Coastguard Worker
47*e07d83d3SAndroid Build Coastguard WorkerThe [examples](https://github.com/grpc/grpc-java/tree/v1.56.0/examples) and the
48*e07d83d3SAndroid Build Coastguard Worker[Android example](https://github.com/grpc/grpc-java/tree/v1.56.0/examples/android)
49*e07d83d3SAndroid Build Coastguard Workerare standalone projects that showcase the usage of gRPC.
50*e07d83d3SAndroid Build Coastguard Worker
51*e07d83d3SAndroid Build Coastguard WorkerDownload
52*e07d83d3SAndroid Build Coastguard Worker--------
53*e07d83d3SAndroid Build Coastguard Worker
54*e07d83d3SAndroid Build Coastguard WorkerDownload [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
55*e07d83d3SAndroid Build Coastguard Worker```xml
56*e07d83d3SAndroid Build Coastguard Worker<dependency>
57*e07d83d3SAndroid Build Coastguard Worker  <groupId>io.grpc</groupId>
58*e07d83d3SAndroid Build Coastguard Worker  <artifactId>grpc-netty-shaded</artifactId>
59*e07d83d3SAndroid Build Coastguard Worker  <version>1.56.0</version>
60*e07d83d3SAndroid Build Coastguard Worker  <scope>runtime</scope>
61*e07d83d3SAndroid Build Coastguard Worker</dependency>
62*e07d83d3SAndroid Build Coastguard Worker<dependency>
63*e07d83d3SAndroid Build Coastguard Worker  <groupId>io.grpc</groupId>
64*e07d83d3SAndroid Build Coastguard Worker  <artifactId>grpc-protobuf</artifactId>
65*e07d83d3SAndroid Build Coastguard Worker  <version>1.56.0</version>
66*e07d83d3SAndroid Build Coastguard Worker</dependency>
67*e07d83d3SAndroid Build Coastguard Worker<dependency>
68*e07d83d3SAndroid Build Coastguard Worker  <groupId>io.grpc</groupId>
69*e07d83d3SAndroid Build Coastguard Worker  <artifactId>grpc-stub</artifactId>
70*e07d83d3SAndroid Build Coastguard Worker  <version>1.56.0</version>
71*e07d83d3SAndroid Build Coastguard Worker</dependency>
72*e07d83d3SAndroid Build Coastguard Worker<dependency> <!-- necessary for Java 9+ -->
73*e07d83d3SAndroid Build Coastguard Worker  <groupId>org.apache.tomcat</groupId>
74*e07d83d3SAndroid Build Coastguard Worker  <artifactId>annotations-api</artifactId>
75*e07d83d3SAndroid Build Coastguard Worker  <version>6.0.53</version>
76*e07d83d3SAndroid Build Coastguard Worker  <scope>provided</scope>
77*e07d83d3SAndroid Build Coastguard Worker</dependency>
78*e07d83d3SAndroid Build Coastguard Worker```
79*e07d83d3SAndroid Build Coastguard Worker
80*e07d83d3SAndroid Build Coastguard WorkerOr for Gradle with non-Android, add to your dependencies:
81*e07d83d3SAndroid Build Coastguard Worker```gradle
82*e07d83d3SAndroid Build Coastguard WorkerruntimeOnly 'io.grpc:grpc-netty-shaded:1.56.0'
83*e07d83d3SAndroid Build Coastguard Workerimplementation 'io.grpc:grpc-protobuf:1.56.0'
84*e07d83d3SAndroid Build Coastguard Workerimplementation 'io.grpc:grpc-stub:1.56.0'
85*e07d83d3SAndroid Build Coastguard WorkercompileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
86*e07d83d3SAndroid Build Coastguard Worker```
87*e07d83d3SAndroid Build Coastguard Worker
88*e07d83d3SAndroid Build Coastguard WorkerFor Android client, use `grpc-okhttp` instead of `grpc-netty-shaded` and
89*e07d83d3SAndroid Build Coastguard Worker`grpc-protobuf-lite` instead of `grpc-protobuf`:
90*e07d83d3SAndroid Build Coastguard Worker```gradle
91*e07d83d3SAndroid Build Coastguard Workerimplementation 'io.grpc:grpc-okhttp:1.56.0'
92*e07d83d3SAndroid Build Coastguard Workerimplementation 'io.grpc:grpc-protobuf-lite:1.56.0'
93*e07d83d3SAndroid Build Coastguard Workerimplementation 'io.grpc:grpc-stub:1.56.0'
94*e07d83d3SAndroid Build Coastguard WorkercompileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
95*e07d83d3SAndroid Build Coastguard Worker```
96*e07d83d3SAndroid Build Coastguard Worker
97*e07d83d3SAndroid Build Coastguard WorkerFor [Bazel](https://bazel.build), you can either
98*e07d83d3SAndroid Build Coastguard Worker[use Maven](https://github.com/bazelbuild/rules_jvm_external)
99*e07d83d3SAndroid Build Coastguard Worker(with the GAVs from above), or use `@io_grpc_grpc_java//api` et al (see below).
100*e07d83d3SAndroid Build Coastguard Worker
101*e07d83d3SAndroid Build Coastguard Worker[the JARs]:
102*e07d83d3SAndroid Build Coastguard Workerhttps://search.maven.org/search?q=g:io.grpc%20AND%20v:1.56.0
103*e07d83d3SAndroid Build Coastguard Worker
104*e07d83d3SAndroid Build Coastguard WorkerDevelopment snapshots are available in [Sonatypes's snapshot
105*e07d83d3SAndroid Build Coastguard Workerrepository](https://oss.sonatype.org/content/repositories/snapshots/).
106*e07d83d3SAndroid Build Coastguard Worker
107*e07d83d3SAndroid Build Coastguard WorkerGenerated Code
108*e07d83d3SAndroid Build Coastguard Worker--------------
109*e07d83d3SAndroid Build Coastguard Worker
110*e07d83d3SAndroid Build Coastguard WorkerFor protobuf-based codegen, you can put your proto files in the `src/main/proto`
111*e07d83d3SAndroid Build Coastguard Workerand `src/test/proto` directories along with an appropriate plugin.
112*e07d83d3SAndroid Build Coastguard Worker
113*e07d83d3SAndroid Build Coastguard WorkerFor protobuf-based codegen integrated with the Maven build system, you can use
114*e07d83d3SAndroid Build Coastguard Worker[protobuf-maven-plugin][] (Eclipse and NetBeans users should also look at
115*e07d83d3SAndroid Build Coastguard Worker`os-maven-plugin`'s
116*e07d83d3SAndroid Build Coastguard Worker[IDE documentation](https://github.com/trustin/os-maven-plugin#issues-with-eclipse-m2e-or-other-ides)):
117*e07d83d3SAndroid Build Coastguard Worker```xml
118*e07d83d3SAndroid Build Coastguard Worker<build>
119*e07d83d3SAndroid Build Coastguard Worker  <extensions>
120*e07d83d3SAndroid Build Coastguard Worker    <extension>
121*e07d83d3SAndroid Build Coastguard Worker      <groupId>kr.motd.maven</groupId>
122*e07d83d3SAndroid Build Coastguard Worker      <artifactId>os-maven-plugin</artifactId>
123*e07d83d3SAndroid Build Coastguard Worker      <version>1.7.1</version>
124*e07d83d3SAndroid Build Coastguard Worker    </extension>
125*e07d83d3SAndroid Build Coastguard Worker  </extensions>
126*e07d83d3SAndroid Build Coastguard Worker  <plugins>
127*e07d83d3SAndroid Build Coastguard Worker    <plugin>
128*e07d83d3SAndroid Build Coastguard Worker      <groupId>org.xolstice.maven.plugins</groupId>
129*e07d83d3SAndroid Build Coastguard Worker      <artifactId>protobuf-maven-plugin</artifactId>
130*e07d83d3SAndroid Build Coastguard Worker      <version>0.6.1</version>
131*e07d83d3SAndroid Build Coastguard Worker      <configuration>
132*e07d83d3SAndroid Build Coastguard Worker        <protocArtifact>com.google.protobuf:protoc:3.22.3:exe:${os.detected.classifier}</protocArtifact>
133*e07d83d3SAndroid Build Coastguard Worker        <pluginId>grpc-java</pluginId>
134*e07d83d3SAndroid Build Coastguard Worker        <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.56.0:exe:${os.detected.classifier}</pluginArtifact>
135*e07d83d3SAndroid Build Coastguard Worker      </configuration>
136*e07d83d3SAndroid Build Coastguard Worker      <executions>
137*e07d83d3SAndroid Build Coastguard Worker        <execution>
138*e07d83d3SAndroid Build Coastguard Worker          <goals>
139*e07d83d3SAndroid Build Coastguard Worker            <goal>compile</goal>
140*e07d83d3SAndroid Build Coastguard Worker            <goal>compile-custom</goal>
141*e07d83d3SAndroid Build Coastguard Worker          </goals>
142*e07d83d3SAndroid Build Coastguard Worker        </execution>
143*e07d83d3SAndroid Build Coastguard Worker      </executions>
144*e07d83d3SAndroid Build Coastguard Worker    </plugin>
145*e07d83d3SAndroid Build Coastguard Worker  </plugins>
146*e07d83d3SAndroid Build Coastguard Worker</build>
147*e07d83d3SAndroid Build Coastguard Worker```
148*e07d83d3SAndroid Build Coastguard Worker
149*e07d83d3SAndroid Build Coastguard Worker[protobuf-maven-plugin]: https://www.xolstice.org/protobuf-maven-plugin/
150*e07d83d3SAndroid Build Coastguard Worker
151*e07d83d3SAndroid Build Coastguard WorkerFor non-Android protobuf-based codegen integrated with the Gradle build system,
152*e07d83d3SAndroid Build Coastguard Workeryou can use [protobuf-gradle-plugin][]:
153*e07d83d3SAndroid Build Coastguard Worker```gradle
154*e07d83d3SAndroid Build Coastguard Workerplugins {
155*e07d83d3SAndroid Build Coastguard Worker    id 'com.google.protobuf' version '0.9.1'
156*e07d83d3SAndroid Build Coastguard Worker}
157*e07d83d3SAndroid Build Coastguard Worker
158*e07d83d3SAndroid Build Coastguard Workerprotobuf {
159*e07d83d3SAndroid Build Coastguard Worker  protoc {
160*e07d83d3SAndroid Build Coastguard Worker    artifact = "com.google.protobuf:protoc:3.22.3"
161*e07d83d3SAndroid Build Coastguard Worker  }
162*e07d83d3SAndroid Build Coastguard Worker  plugins {
163*e07d83d3SAndroid Build Coastguard Worker    grpc {
164*e07d83d3SAndroid Build Coastguard Worker      artifact = 'io.grpc:protoc-gen-grpc-java:1.56.0'
165*e07d83d3SAndroid Build Coastguard Worker    }
166*e07d83d3SAndroid Build Coastguard Worker  }
167*e07d83d3SAndroid Build Coastguard Worker  generateProtoTasks {
168*e07d83d3SAndroid Build Coastguard Worker    all()*.plugins {
169*e07d83d3SAndroid Build Coastguard Worker      grpc {}
170*e07d83d3SAndroid Build Coastguard Worker    }
171*e07d83d3SAndroid Build Coastguard Worker  }
172*e07d83d3SAndroid Build Coastguard Worker}
173*e07d83d3SAndroid Build Coastguard Worker```
174*e07d83d3SAndroid Build Coastguard Worker
175*e07d83d3SAndroid Build Coastguard Worker[protobuf-gradle-plugin]: https://github.com/google/protobuf-gradle-plugin
176*e07d83d3SAndroid Build Coastguard Worker
177*e07d83d3SAndroid Build Coastguard WorkerThe prebuilt protoc-gen-grpc-java binary uses glibc on Linux. If you are
178*e07d83d3SAndroid Build Coastguard Workercompiling on Alpine Linux, you may want to use the [Alpine grpc-java package][]
179*e07d83d3SAndroid Build Coastguard Workerwhich uses musl instead.
180*e07d83d3SAndroid Build Coastguard Worker
181*e07d83d3SAndroid Build Coastguard Worker[Alpine grpc-java package]: https://pkgs.alpinelinux.org/package/edge/community/x86_64/grpc-java
182*e07d83d3SAndroid Build Coastguard Worker
183*e07d83d3SAndroid Build Coastguard WorkerFor Android protobuf-based codegen integrated with the Gradle build system, also
184*e07d83d3SAndroid Build Coastguard Workeruse protobuf-gradle-plugin but specify the 'lite' options:
185*e07d83d3SAndroid Build Coastguard Worker
186*e07d83d3SAndroid Build Coastguard Worker```gradle
187*e07d83d3SAndroid Build Coastguard Workerplugins {
188*e07d83d3SAndroid Build Coastguard Worker    id 'com.google.protobuf' version '0.9.1'
189*e07d83d3SAndroid Build Coastguard Worker}
190*e07d83d3SAndroid Build Coastguard Worker
191*e07d83d3SAndroid Build Coastguard Workerprotobuf {
192*e07d83d3SAndroid Build Coastguard Worker  protoc {
193*e07d83d3SAndroid Build Coastguard Worker    artifact = "com.google.protobuf:protoc:3.22.3"
194*e07d83d3SAndroid Build Coastguard Worker  }
195*e07d83d3SAndroid Build Coastguard Worker  plugins {
196*e07d83d3SAndroid Build Coastguard Worker    grpc {
197*e07d83d3SAndroid Build Coastguard Worker      artifact = 'io.grpc:protoc-gen-grpc-java:1.56.0'
198*e07d83d3SAndroid Build Coastguard Worker    }
199*e07d83d3SAndroid Build Coastguard Worker  }
200*e07d83d3SAndroid Build Coastguard Worker  generateProtoTasks {
201*e07d83d3SAndroid Build Coastguard Worker    all().each { task ->
202*e07d83d3SAndroid Build Coastguard Worker      task.builtins {
203*e07d83d3SAndroid Build Coastguard Worker        java { option 'lite' }
204*e07d83d3SAndroid Build Coastguard Worker      }
205*e07d83d3SAndroid Build Coastguard Worker      task.plugins {
206*e07d83d3SAndroid Build Coastguard Worker        grpc { option 'lite' }
207*e07d83d3SAndroid Build Coastguard Worker      }
208*e07d83d3SAndroid Build Coastguard Worker    }
209*e07d83d3SAndroid Build Coastguard Worker  }
210*e07d83d3SAndroid Build Coastguard Worker}
211*e07d83d3SAndroid Build Coastguard Worker
212*e07d83d3SAndroid Build Coastguard Worker```
213*e07d83d3SAndroid Build Coastguard Worker
214*e07d83d3SAndroid Build Coastguard WorkerFor [Bazel](https://bazel.build), use the [`proto_library`](https://github.com/bazelbuild/rules_proto)
215*e07d83d3SAndroid Build Coastguard Workerand the [`java_proto_library`](https://bazel.build/reference/be/java#java_proto_library) (no `load()` required)
216*e07d83d3SAndroid Build Coastguard Workerand `load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")` (from this project), as in
217*e07d83d3SAndroid Build Coastguard Worker[this example `BUILD.bazel`](https://github.com/grpc/grpc-java/blob/master/examples/BUILD.bazel).
218*e07d83d3SAndroid Build Coastguard Worker
219*e07d83d3SAndroid Build Coastguard WorkerAPI Stability
220*e07d83d3SAndroid Build Coastguard Worker-------------
221*e07d83d3SAndroid Build Coastguard Worker
222*e07d83d3SAndroid Build Coastguard WorkerAPIs annotated with `@Internal` are for internal use by the gRPC library and
223*e07d83d3SAndroid Build Coastguard Workershould not be used by gRPC users. APIs annotated with `@ExperimentalApi` are
224*e07d83d3SAndroid Build Coastguard Workersubject to change in future releases, and library code that other projects
225*e07d83d3SAndroid Build Coastguard Workermay depend on should not use these APIs.
226*e07d83d3SAndroid Build Coastguard Worker
227*e07d83d3SAndroid Build Coastguard WorkerWe recommend using the
228*e07d83d3SAndroid Build Coastguard Worker[grpc-java-api-checker](https://github.com/grpc/grpc-java-api-checker)
229*e07d83d3SAndroid Build Coastguard Worker(an [Error Prone](https://github.com/google/error-prone) plugin)
230*e07d83d3SAndroid Build Coastguard Workerto check for usages of `@ExperimentalApi` and `@Internal` in any library code
231*e07d83d3SAndroid Build Coastguard Workerthat depends on gRPC. It may also be used to check for `@Internal` usage or
232*e07d83d3SAndroid Build Coastguard Workerunintended `@ExperimentalApi` consumption in non-library code.
233*e07d83d3SAndroid Build Coastguard Worker
234*e07d83d3SAndroid Build Coastguard WorkerHow to Build
235*e07d83d3SAndroid Build Coastguard Worker------------
236*e07d83d3SAndroid Build Coastguard Worker
237*e07d83d3SAndroid Build Coastguard WorkerIf you are making changes to gRPC-Java, see the [compiling
238*e07d83d3SAndroid Build Coastguard Workerinstructions](COMPILING.md).
239*e07d83d3SAndroid Build Coastguard Worker
240*e07d83d3SAndroid Build Coastguard WorkerHigh-level Components
241*e07d83d3SAndroid Build Coastguard Worker---------------------
242*e07d83d3SAndroid Build Coastguard Worker
243*e07d83d3SAndroid Build Coastguard WorkerAt a high level there are three distinct layers to the library: *Stub*,
244*e07d83d3SAndroid Build Coastguard Worker*Channel*, and *Transport*.
245*e07d83d3SAndroid Build Coastguard Worker
246*e07d83d3SAndroid Build Coastguard Worker### Stub
247*e07d83d3SAndroid Build Coastguard Worker
248*e07d83d3SAndroid Build Coastguard WorkerThe Stub layer is what is exposed to most developers and provides type-safe
249*e07d83d3SAndroid Build Coastguard Workerbindings to whatever datamodel/IDL/interface you are adapting. gRPC comes with
250*e07d83d3SAndroid Build Coastguard Workera [plugin](https://github.com/google/grpc-java/blob/master/compiler) to the
251*e07d83d3SAndroid Build Coastguard Workerprotocol-buffers compiler that generates Stub interfaces out of `.proto` files,
252*e07d83d3SAndroid Build Coastguard Workerbut bindings to other datamodel/IDL are easy and encouraged.
253*e07d83d3SAndroid Build Coastguard Worker
254*e07d83d3SAndroid Build Coastguard Worker### Channel
255*e07d83d3SAndroid Build Coastguard Worker
256*e07d83d3SAndroid Build Coastguard WorkerThe Channel layer is an abstraction over Transport handling that is suitable for
257*e07d83d3SAndroid Build Coastguard Workerinterception/decoration and exposes more behavior to the application than the
258*e07d83d3SAndroid Build Coastguard WorkerStub layer. It is intended to be easy for application frameworks to use this
259*e07d83d3SAndroid Build Coastguard Workerlayer to address cross-cutting concerns such as logging, monitoring, auth, etc.
260*e07d83d3SAndroid Build Coastguard Worker
261*e07d83d3SAndroid Build Coastguard Worker### Transport
262*e07d83d3SAndroid Build Coastguard Worker
263*e07d83d3SAndroid Build Coastguard WorkerThe Transport layer does the heavy lifting of putting and taking bytes off the
264*e07d83d3SAndroid Build Coastguard Workerwire. The interfaces to it are abstract just enough to allow plugging in of
265*e07d83d3SAndroid Build Coastguard Workerdifferent implementations. Note the transport layer API is considered internal
266*e07d83d3SAndroid Build Coastguard Workerto gRPC and has weaker API guarantees than the core API under package `io.grpc`.
267*e07d83d3SAndroid Build Coastguard Worker
268*e07d83d3SAndroid Build Coastguard WorkergRPC comes with multiple Transport implementations:
269*e07d83d3SAndroid Build Coastguard Worker
270*e07d83d3SAndroid Build Coastguard Worker1. The Netty-based HTTP/2 transport is the main transport implementation based
271*e07d83d3SAndroid Build Coastguard Worker   on [Netty](https://netty.io). It is not officially supported on Android.
272*e07d83d3SAndroid Build Coastguard Worker2. The OkHttp-based HTTP/2 transport is a lightweight transport based on
273*e07d83d3SAndroid Build Coastguard Worker   [Okio](https://square.github.io/okio/) and forked low-level parts of
274*e07d83d3SAndroid Build Coastguard Worker   [OkHttp](https://square.github.io/okhttp/). It is mainly for use on Android.
275*e07d83d3SAndroid Build Coastguard Worker3. The in-process transport is for when a server is in the same process as the
276*e07d83d3SAndroid Build Coastguard Worker   client. It is used frequently for testing, while also being safe for
277*e07d83d3SAndroid Build Coastguard Worker   production use.
278*e07d83d3SAndroid Build Coastguard Worker4. The Binder transport is for Android cross-process communication on a single
279*e07d83d3SAndroid Build Coastguard Worker   device.
280