Commit Graph

361 Commits

Author SHA1 Message Date
Eric Anderson 9cb36c6e20 Mark some APIs codegen uses experimental to allow for optimizations
Fixes #975
2015-09-11 11:13:27 -07:00
Carl Mastrangelo f6582d822d Add a hook to set TLS 2015-09-11 10:03:30 -07:00
Eric Anderson 538cf215f0 Add usePlaintext to ManagedChannelBuilder 2015-09-11 09:57:42 -07:00
Eric Anderson 5b2a03a02e Add overrideAuthority to ManagedChannelBuilder
We want to allow overriding authority in the ManagedChannelBuilder for
testing. In doing that, we basically require that all Channels support
authority. In reality, this simplifies things and is already being done
by the C implementation, as their unix domain socket support uses
"localhost" just like our in-process transport now does.

We can debate some whether "localhost" is really the most appropriate
authority for the in-process transport, but that should probably happen
later since "localhost" is "good enough" for now.
2015-09-11 09:37:49 -07:00
Eric Anderson 3ae18eaef1 Add overrideAuthority to NettyChannelBuilder
Although the functionality is currently available by passing a
manually-created InetAddress, that requires that the user do I/O before
calling our API and does not work with naming in the future.
2015-09-11 09:37:43 -07:00
Eric Anderson a6621daca2 Private ServerMethodDefinition constructor; avoid create() in codegen
There is no need to use ServerMethodDefinition in codegen. The create()
method itself could be helpful to a dynamic HandlerRegistry
implementation, so we won't remove it.
2015-09-11 09:25:24 -07:00
Carl Mastrangelo 416b745d8d Add a Server Provider 2015-09-10 12:23:17 -07:00
Eric Anderson df7bf44687 Enable license header checking in checkstyle 2015-09-10 11:29:00 -07:00
Carl Mastrangelo e969a900a0 Add proper generics to ManagedChannelProvider 2015-09-10 09:52:13 -07:00
Eric Anderson 31394aa9df Let transports be channel service providers for generic usage
This provides an API for applications to use gRPC without using
ExperimentalApis. It also allows swapping out a transport implementation
in the future.
2015-09-09 11:06:35 -07:00
Carl Mastrangelo 3cf76326a2 Move decompressor setting to Server Impl 2015-09-08 13:03:27 -07:00
Carl Mastrangelo 950fe1d108 Use ReqT and RespT for generics 2015-09-08 12:51:03 -07:00
Kun Zhang ae4ee40711 Fix flow-control documentation on Stream 2015-09-08 10:20:07 -07:00
Carl Mastrangelo 1ad2bf9eda Add a way to distinguish between advertised message encodings, and add tests 2015-09-04 14:42:45 -07:00
Carl Mastrangelo ebe8a0d703 Remove Metadata.Headers and Metadata.Trailers 2015-09-03 15:22:45 -07:00
Carl Mastrangelo f612746b97 Update comment in MethodDescriptor.Marshaller 2015-09-03 15:10:18 -07:00
Carl Mastrangelo 28d51c5e3e Add an authority header to HandlerRegistry.lookupMethod 2015-09-03 15:03:02 -07:00
Carl Mastrangelo 5d34599390 Daemonize InProcess threads 2015-09-03 14:57:20 -07:00
Louis Ryan 6a782a035e Use Executor in stable builder APIs instead of ExecutorService 2015-09-03 14:38:13 -07:00
Carl Mastrangelo f641e081a0 Daemonize shared threads, and make sure each thread has a name 2015-09-03 14:25:53 -07:00
Eric Anderson 6122dafee0 Add a missing channel builder methods not copied in b687bdc 2015-09-03 12:21:47 -07:00
nmittler b687bdc742 Refactoring channel API.
Client:
* New ManagedChannel abstract class.
* Adding ping to Channel.
* Moving builders and implementations to internal.

Server:
* Added lifecycle management API to Server (mirroring ManagedChannel).
* Moved ServerImpl, AbstractServerBuilder and handler registries to internal.
* New ServerBuilder abstract class (mirroring ManagedChannelBuilder).

Fixes #545
2015-09-03 11:22:29 -07:00
Kun Zhang 65b4e0b1f2 Document valid characters allowed in metadata keys 2015-09-03 10:49:04 -07:00
Xudong Ma 00e024c684 Fix Travis breakage caused by checkStyle failure. 2015-09-03 09:46:22 -07:00
Kun Zhang 609f31a578 Document valid characters for AsciiMarshaller 2015-09-02 15:57:07 -07:00
Carl Mastrangelo f8a87eecce Remove HandlerRegistry.Method 2015-09-02 14:37:44 -07:00
Eric Anderson 01ba973dd4 Prevent status from impacting how ServerCall.Listener is invoked
Fixes #639
2015-09-02 09:48:05 -07:00
Eric Anderson 210114d4a2 Ease use of JWT by passing URI to auth library
The URI no longer needs to be provided to the Credential explicitly,
which prevents needing to know a magic string and allows using the same
Credential with multiple services.
2015-09-01 15:42:58 -07:00
nmittler 6a526ecc93 Adding missing RunWith annotation for tests. 2015-09-01 11:40:17 -07:00
nmittler d3ab427fca Enforce content-type on client and server.
Fixes #360
2015-09-01 06:59:46 -07:00
Eric Anderson 949b6d7da8 Fields in MethodDescriptor can't be null 2015-08-31 17:48:05 -07:00
Carl Mastrangelo 396f0606f3 Add test to prove RST closes stream, and remove hack from transport to force closure. 2015-08-31 13:26:49 -07:00
Carl Mastrangelo d678498ca7 Add unit tests for AbstractServerStream 2015-08-28 13:00:27 -07:00
Stanley Cheung e4987cd1f2 update reference to grpc-common to examples 2015-08-27 16:10:33 -07:00
Carl Mastrangelo 080190c753 Make ServerCall.Listener methods Nops 2015-08-27 13:13:42 -07:00
Carl Mastrangelo 5ade1b726f Make ClientCall listener methods noops 2015-08-27 11:36:59 -07:00
nmittler bcdef34c52 Removing unused method in ServerImpl 2015-08-27 10:26:56 -07:00
nmittler 15f02ba19c Adding maxMessageSize config option
Fixes #832
2015-08-26 15:32:33 -07:00
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