Commit Graph

323 Commits

Author SHA1 Message Date
Carl Mastrangelo 4221f5a81c Change ExperimentalApi field 'comment' to 'value' 2015-08-26 13:40:11 -07:00
Carl Mastrangelo cb734e3049 Document equals and hashCode on Status 2015-08-26 13:31:13 -07:00
Carl Mastrangelo b5eaaf378e Add @ExperimentalApi annotation to compression methods 2015-08-26 13:25:21 -07:00
Kun Zhang 8225d2a6a6 Add comment field to ExperimentalApi 2015-08-26 10:42:08 -07:00
Carl Mastrangelo 0d9ac41bdd Minor cleanup in deframer 2015-08-26 09:58:15 -07:00
nmittler 777e928536 Removing transport shutdown hooks from channel builder
The current process of building a channel is a bit complicated in that transports have to provide a own shutdown hook to the channel builder in order to close shared executors. This somewhat entagled creation pattern makes it difficult to separate the process of channel building from transport building. Better separating these two should make the code more readable and maintainable moving forward.
2015-08-25 08:38:39 -07:00
Xudong Ma 2247ad2a2b Makes application-provided string comes first in User-Agent 2015-08-24 19:42:16 -07:00
Kun Zhang 68c82bc2f3 Make ServerImpl constructor pakcage-private 2015-08-24 15:13:25 -07:00
Xudong Ma c5ea5c78cf Update Java doc for a508c1d4f5 2015-08-24 13:49:51 -07:00
Carl Mastrangelo a508c1d4f5 Remove Headers 2015-08-24 11:41:10 -07:00
Kun Zhang 7b6a498eff Annotate ServerEssentials, buildEssentials() and ServerImpl's constructor with @Internal 2015-08-24 10:17:00 -07:00
nmittler e2f88fa904 Moving a few common utilities to GrpcUtil. 2015-08-24 07:53:32 -07:00
nmittler aeae7a8e74 Rename HttpUtil to GrpcUtil.
It's not really just for HTTP, it has becoming a dumping ground for many internal constants/utilities.
2015-08-21 14:02:26 -07:00
Kun Zhang d68c101a55 Fix documentation on ClientCall.request().
request() is allowed after halfClose(), and is not necessarily forbidden
after cancel() (current implementation does not).
2015-08-21 08:59:49 -07:00
Carl Mastrangelo 701bbe509f Add unit tests to AbstractClientStream 2015-08-20 17:14:08 -07:00
Kun Zhang 042b278256 Remove the first MethodDescriptor constructor.
that takes the service name and method name separately.

Also fix tests that are still using the old full qualified method name
format.
2015-08-20 14:19:50 -07:00
Carl Mastrangelo 6ebf9b1373 fix comment 2015-08-20 13:19:16 -07:00
Xudong Ma 75f71c845b Avoid deprecation warning on import 2015-08-20 09:47:03 -07:00
Kun Zhang 1a0ee96423 Improve documentation for ClientCall. 2015-08-20 09:15:23 -07:00
Kun Zhang 687a6f4814 Skip io.grpc.internal in javadoc.
Also move ExperimentalApi and Internal to io.grpc, so that they appear
in javadoc.
2015-08-20 08:48:44 -07:00
Carl Mastrangelo 0b3fa8eece Remove unnecessary instanceof check 2015-08-17 15:49:33 -07:00
Carl Mastrangelo 77b00e050b Add Part 1 of compression 2015-08-17 11:32:52 -07:00
Eric Anderson e72332ce5d Add missing Generic param to Answers 2015-08-14 14:53:11 -07:00
Eric Anderson d12f454e1f Change Metadata.Trailers to Metadata in JavaDoc 2015-08-14 08:36:37 -07:00
Carl Mastrangelo 572f4332a7 Remove Trailers 2015-08-13 17:11:29 -07:00
Carl Mastrangelo 68fe049e35 Remove Deprecated newCall method on Channel 2015-08-13 13:24:37 -07:00
Xudong Ma ca7587f641 Change some error status usages to be consistent with other gRPC implementations. 2015-08-13 13:14:21 -07:00
Kun Zhang 0eb98621ed Annotations for unstable and internal interfaces.
- Add `@Internal` and `@ExperimentalApi`, both are annotated `@Internal`
- Annotate `@Internal` to `package io.grpc.internal`
- AbstractChannelBuilder.ChannelEssentials is annotated `@Internal`
- ChannelImpl.ping() is annotated `@ExperimentalApi`
- Context is annotated `@ExperimentalApi`
- Add `package-info.java` to `io.grpc.inprocess` and `io.grpc.internal`.
2015-08-12 15:03:23 -07:00
Kun Zhang e1bd6ef45f Clean up the left-over of the transport package reorganization 2015-08-11 12:48:02 -07:00
Kun Zhang f681b5f8be Move Marshaller into MethodDescriptor 2015-08-11 10:53:38 -07:00
Kun Zhang d2929cd1a3 Reorganize packages.
Reserve io.grpc for public API only, and all internal stuff in core to
io.grpc.internal, including the non-stable transport API.

Raise the netty/okhttp/inprocess subpackages one level up to io.grpc,
because they are public API and entry points for most users.

Details:

- Rename io.grpc.transport to io.grpc.internal;
- Move SharedResourceHolder and SerializingExecutor to io.grpc.internal
- Rename io.grpc.transport.{netty|okhttp|inprocess} to
  io.grpc.{netty|okhttp|inprocess}
2015-08-10 15:04:29 -07:00
Carl Mastrangelo 4b4f76da8c Remove deprecated classes from ServerInterceptors 2015-08-07 11:39:00 -07:00
Carl Mastrangelo 7d3d80e69f Add a javadoc for AbstractChannelBuilder.buildEssentials 2015-08-07 11:09:26 -07:00
Carl Mastrangelo 9b733b57e0 Add a javadoc for AbstractServerBuilder.buildEssentials 2015-08-07 10:01:48 -07:00
Carl Mastrangelo b141093b3b Make serverInterceptor use MethodDescriptor 2015-08-07 09:28:29 -07:00
Eric Anderson 6ff7b220b6 Improve generics in {Client,Server}Interceptors 2015-08-06 17:34:17 -07:00
Kun Zhang fc85a4085a Add more documentation for transports.
- Add package descriptions for transport, netty and okhttp.
- Describe transports (netty, okhttp and inprocess) in README
2015-08-06 17:24:42 -07:00
Xudong Ma b737435d0d Tighten up some access limit 2015-08-06 15:25:51 -07:00
Carl Mastrangelo aebb58b200 Change awaitTerminated to awaitTermination 2015-08-06 13:52:17 -07:00
Carl Mastrangelo a947178698 Remove deprecated ClientInterceptors classes 2015-08-06 13:46:02 -07:00
Carl Mastrangelo b7822e8f88 Fix javadoc, and remove deprecated classes 2015-08-06 12:27:45 -07:00
Kun Zhang 9992156bd8 Add available() to KnownLength 2015-08-06 10:04:31 -07:00
Carl Mastrangelo e76b8e7ee8 Renamed Server payload to message 2015-08-05 17:10:37 -07:00
Carl Mastrangelo 67fc45d036 Rename Duplex to Bidi 2015-08-05 17:05:47 -07:00
Eric Anderson e45c0c53d0 Fix shutting down a never-started ServerImpl 2015-08-05 16:56:55 -07:00
Xudong Ma ef106e0593 Make the change on status effective. 2015-08-04 18:06:25 -07:00
Eric Anderson f68c10baab Don't hold channel/server lock when shutting down transport
Holding the lock while calling the transport can cause a deadlock, as
shown in #696. In previous auditing for deadlock prevention I considered
heavily Call interactions, but failed to consider shutdown() and realize
it was holding a lock while calling transport.shutdown().

We still hold a lock when calling transport.start(). Although it is
conceivable that this could cause a deadlock as the code evolves over
time, I don't believe it can cause a deadlock today or that the risk is
very high. In addition, it would require more effort to solve.
2015-08-04 16:51:24 -07:00
Carl Mastrangelo 2c2c48a592 Implement Transport reconnect 2015-08-04 13:19:35 -07:00
Eric Anderson 248f575a59 Make any lib-generated UNKNOWN have description
Note that even more importantly, this translates a RST_STREAM error code
to a gRPC status code. This is generally useful, but also necessary for
DEADLINE_EXCEEDED to be more reliable in 0eae0d9.

Fixes #687
2015-08-03 11:15:02 -07:00
Carl Mastrangelo 384a80593d Remove all support for Payload 2015-08-03 10:04:01 -07:00