Commit Graph

183 Commits

Author SHA1 Message Date
Eric Anderson 656dcc1c7c core,stub: Document grpc performs compression nego on server 2019-03-11 15:36:21 -06:00
Carl Mastrangelo 3a39b81cf5
all: remove java6 type args 2019-02-04 10:03:50 -08:00
Kun Zhang 8706a37a3b
doc: fix a javadoc warning (#5136) 2018-12-06 21:51:34 -08:00
Ze'ev Klapow 9111602d7c StreamObservers: make sure onComplete only gets called once from onReadyHandler
Fixes #4558
2018-12-05 12:59:09 -08:00
Venil Noronha 3f4c3f0406 stub: disable exception if onCancelHandler set
This restrains a cancellation Exception when an onCancelHandler
is set in ServerCallStreamObserverImpl.

Signed-off-by: Venil Noronha <veniln@vmware.com>
2018-11-30 18:36:12 -06:00
Rodrigo Queiro 8481943866 Add missing j2objc dependency to Bazel build
This avoids a warning when building artifacts that depend on Guava.

Fixes #5046.
2018-11-13 13:39:35 -08:00
ST-DDT 417c41b6cb stub: fix null check in MetadataUtils.
Fixes #5045
2018-11-13 08:35:47 -08:00
Carl Mastrangelo b0f423295b
all: use Java7 brackets 2018-09-14 13:52:29 -07:00
ZHANG Dapeng a18abfbf9f
stub: stablize AbstractStub.withExecutor API
Resolves #3605
2018-08-29 11:58:13 -07:00
zpencer 0d79e7a13c
stub: disableAutoInboundFlowControl javadoc correction (#4785)
The docs refer to the wrong places where this feature is ignored.
2018-08-23 15:54:47 -07:00
Carl Mastrangelo 6d4841a8c2
stub: update docs about Call lifetime + minor cleanups
* Reflowed some method parameters to be on the same line, else one
  parameter per line
* Used `@link` where appropriate
* Made some parameters non-final where it had no effect
* Renamed some parameters to be consistent
2018-08-13 14:36:32 -07:00
Eric Gribkoff 79b24709b9
all: update animalsniffer to Java 7 and add Android 14 (#4727) 2018-08-09 09:09:21 -07:00
Carl Mastrangelo 85448189ee
all: add tracking issues for all experimental APIs and make it required
Additionally, make Status*Exception.getTrailers() non experimental
2018-07-31 15:28:48 -07:00
Eric Anderson 989bc87dda bazel: Remove http_file trick for neverlink
The trick wasn't necessary, as any java_library can mark itself as
neverlink which applies to its dependencies.
2018-07-30 13:23:56 -07:00
Carl Mastrangelo 8da06a8bc4
all: remove unneeded deps on errorprone 2018-07-23 17:51:44 -07:00
Eric Anderson 15a5ba2698 Remove DoNotMock annotation in favor of JavaDoc
DoNotMock was removed from error_prone_annotations in 2.1.3, because
there was no enforcement mechanism (which is in google/error-prone#572).
Guava and Trust also depend on error_prone_annotations and are beginning
to use newer versions, so our usage of DoNotMock is causing diamond
dependency problems. This allows us to update to 2.2.0.

The annotations were useful internally; we're solving that in cl/205294089.
2018-07-20 14:03:55 -07:00
Carl Mastrangelo 146b6006b3
compiler,stub: update RpcMethod docs and usage 2018-07-12 17:01:47 -07:00
jbingham-google ffcb3b964b compiler, stub: Rename inputType and outputType in @RpcMethod 2018-07-10 13:24:50 -07:00
jbingham-google 9229e30287 compiler, stub: Add @RpcMethod annotation
This annotation will enable Java APT to generate code.

Addresses part of #3173.
2018-07-06 17:02:01 -07:00
Carl Mastrangelo 7edb41a4ef
stub: clarify StreamObservers interaction 2018-06-26 15:43:13 -07:00
ZHANG Dapeng 5ce10f0146
all: add gradle format checker
This PR adds an automatic gradle format checker and reformats all the *.gradle files. After this, new changes to *.gradle files will fail to build if not in good format, just like checkStyle failure.
2018-06-11 18:35:18 -07:00
Grant Oakley dbf9bd2158 stub: add @CheckReturnValue to AbstractStub 2018-05-04 15:46:34 -07:00
Carl Mastrangelo 60a0b0c471
all: normalize copyright header 2018-05-03 14:55:21 -07:00
ZHANG Dapeng d50c191aca
core/stub: fix lint warnings 2018-05-02 10:37:32 -07:00
Grant Oakley fcb48ff216 core,stub: Add toString() to ClientCallImpl and GrpcFuture 2018-05-01 16:49:56 -07:00
David Ostrovsky 23fcedfb6f Bazel: Fix compilation in Java 9
Fixes: #3633.

Test Plan:

On most recent Bazel version run:

  $ bazel --host_javabase=/usr/lib64/jvm/java-9-openjdk \
    build --javacopt='--release 9' \
    --java_toolchain=@bazel_tools//tools/jdk:toolchain_jdk9 \
    examples:helloworld_java_grpc
2018-04-26 14:37:57 -07:00
Eric Anderson 4bc0c95d0b Update ErrorProne to 2.1.3 and fix failures
The fixes could have subtle side-effects, but I did take care when making them.
2018-01-09 12:40:55 -08:00
Carl Mastrangelo c9b02db276
all: add Status messages to all statuses 2017-12-04 19:00:16 -08:00
Eric Anderson 5a87a6fff6 stub: Improve threading expectation docs
This mainly copies documentation from other places, like StreamObserver
and ClientCall, but does fix some missing important threading notes.

Fixes #3413
2017-11-10 13:10:17 -08:00
Carl Mastrangelo de408e0a86
stub: update ServerCalls to include status messages
Additionally:

* Prefer RuntimeException from status
* remove redundant "static" on interfaces
* use checkState to shorten code
2017-11-02 14:03:17 -07:00
Carl Mastrangelo 37a67bf041
stub: clean up call cancellation 2017-11-01 17:15:37 -07:00
ZHANG Dapeng c90f27f454 stub: add withExecutor API 2017-10-24 14:00:45 -07:00
zpencer ab0aadf8a7 stub: add missing bazel dep @com_google_errorprone_error_prone_annotations//jar (#3584) 2017-10-18 14:18:53 -07:00
Carl Mastrangelo 765a40c7e6 stub: avoid mocking stub classes 2017-10-05 11:01:57 -07:00
Paul Gross 72b9ee22b8 all: Fix mismatch in naming Bazel Maven jars
This commit aligns the naming of the Bazel Maven jars with the names
used by Bazel's migration-tooling project:

https://github.com/bazelbuild/migration-tooling

Unfortunately, we can't fix @com_google_protobuf_java because it's
required by Bazel itself.

Fixes #3328
2017-08-11 16:39:43 -07:00
Eric Anderson 9be41ba0e8 core,auth: Stabilize auth flow using CallCredentials
As discussed in #1914, we need CallCredentials and MoreCallCredentials
to be stable, but there's less of a strong need for the contents of
CallCredentials to be stable. We're willing to commit to the name,
without needing to commit to the plumbing.
2017-07-27 18:07:18 -07:00
Ryan Michela 3731a5dfcc Implemented ClientCallStreamObserver.cancel() 2017-07-25 14:36:51 -07:00
Carl Mastrangelo f735fc1907 stub: name more anonymous classes 2017-07-14 13:38:27 -07:00
Carl Mastrangelo 193fd057a5 stub: clean up client calls to avoid synthetic class 2017-07-14 13:38:04 -07:00
Carl Mastrangelo d387bfe72f stub: Use named classes rather than anonymous in ServerCalls
This has a number of small benefits.  First, it makes stack traces
easier to read.  For example:

Old class names:
```
ServerCalls$1$1.class
ServerCalls$1.class
ServerCalls$2$1.class
ServerCalls$2.class
```

New class names:
```
ServerCalls$StreamingServerCallHandler.class
ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.class
ServerCalls$UnaryServerCallHandler.class
ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.class
```

This is much easier to read quickly, espcially if line numbers don't
match between HEAD and the code that prints the stack trace.

Another benefit of this is that it drops a class file from the jar
(`EmptyServerCallListener`).

Lastly, it makes it easier in the future to test, since the specific
class can be referenced from a test.  Traditionally this class
hasn't been easy to test.
2017-07-13 14:33:25 -07:00
ZHANG Dapeng 29befc131d doc: update external link 2017-07-12 16:31:55 -07:00
Mehrdad Afshari 68d73fa4d6 doc: Uppercase Java 2017-07-12 14:35:56 -07:00
Mehrdad Afshari 8ce0bc25b6 Canonicalize URL prefixes to https://grpc.io 2017-07-10 16:30:09 -07:00
Eric Anderson c436561fc5 all: Use fixed version number for java 6/7 signatures
This is important for stable builds, as if the signature changes the old source
may no longer validate.
2017-06-30 15:25:34 -07:00
ZHANG Dapeng b7e50ddd05 testing: move NoopClientCall & NoopServerCall to internal
one step for #3105
2017-06-22 15:10:58 -07:00
Simon Horlick 6d9e149dcb build: Add Bazel java_grpc_library rule
Bazel third party dependencies are specified in repositories.bzl which
gives the consumer the ability to opt-out of any dependencies they use
directly in their own project.

Fixes #2756
2017-06-22 13:06:49 -07:00
zpencer 532450996a core: detect invalid states on server side (eg zero responses for unary) (#3068)
The current check in ServerCallImpl is theoretically unsafe (#3059). Move that check into the stub, and expand the unit tests to cover other interesting edge cases on the server side:

client sends one, but zero requests received at onHalfClose
client sends one, but > 1 requests received at onHalfClose
server sends one, but zero responses sent at onComplete
server sends one, but > 1 responses sent via onNext
fixes #2243
fixes #3059
2017-06-15 09:33:01 -07:00
Carl Mastrangelo 166108a943 all: fix licence whitespace 2017-06-01 14:28:37 -07:00
Carl Mastrangelo 3bfd630bff all: update to Apache 2 licence
Also, update the authors.
2017-05-31 13:29:01 -07:00
Eric Anderson eb6acfe186 Javadoc improvements, especially to Context 2017-05-15 10:12:44 -07:00