pools etc) that are shared among channels and servers as default values when
the application doesn't provide its own.
It uses reference counting to shut down resources with a delay.
Changed the channel and server builders to use it for default values of
executors and event loop groups.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78629204
Previously we were using English text, but this just adds extra effort for all
the other languages that will need to implement servers. The integration test
case descriptions uses zero-filled bytes.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78477356
overview:
1) Lots of @SuppressWarnings :)
2) Remove dependencies on StandardCharsets.XXX (which is Java 7)
3) Moved testing/utils/ssl/* to .../stubby/util so that the netty transport doesn't depend directly on the testing module.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78460727
The semantics in gRPC changed where server sending OK before client
half-closes is now permitted.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78404390
Note that we don't yet have plumbing to use a particular certificate for tests, so it isn't integration-test worthy yet.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78369023
Change from /Service.method to /Service/method.
quote from the spec:
Method (required): a path identifying the operation to perform on the
specified host, conforming to RFC 3986 sec 3.3. E.g
“/calendar.v1/ListEvents”
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78288091
Fixes some propagation issues for trailers too
Adds some more testing for metadata exchange
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=77979593
Also add forAddress(String host, int port) to NettyChannelBuilder.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=77909737
In V2 protocol, we don't send endOfStream in data frame, so there is no point to send a 0-length data frame.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=77864520
Right now only netty-based builders are implemented. OkHttp based
builders will be created separately.
Minimal example of creating a stub:
ChannelImpl channel = NettyChannelBuilder
.newBuilder(new InetSocketAddress("localhost", 8980))
.buildAndWaitForRunning();
StockBlockingStub stub = StockGrpc.newStub(channel);
Minimal example of creating and starting a server:
ServerImpl server = NettyServerBuilder.newBuilder(8980)
.addService(StockGrpc.bindService(new StockServer()))
.buildAndWaitForRunning();
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=77787502
This is necessary for a C client to talk to the Java server.
Technically, we should be using application/grpc+proto, but since the
"proto" portion is marshaller-dependent, we will need more plumbing
before we can use the complete form.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=77271620
This CL also:
- Removes the OkHTTP server implementation
- Switches NanoTest and Http2OkHttpTest to use Netty server. These tests are currently @Suppressed as OkHttp is not yet draft 14 compliant. Simon is fixing
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76998151
Also updating to latest version of Netty that contains related fixes. AbstractHttp2ConnectionHandler was renamed.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76977422
- Creates and passes a transport instance to ServerListener.transportCreated().
- Keeps the "/" prefix of the fully qualified method name when passing it to the handler
registry.
- Adds necessary "this." when accessing a member variable in ServerCalls.
- BlockingResponseStream.buffer should be added with BlockingResponseStream.this as
as the mark of end of data.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76922440
ServerServiceDefinition that connects the server with application-provided
service implementation.
Introduces a class Method, that holds the invariables of a method that are
inferred from the proto file, to be reused for creating MethodDescriptor
for client code and ServerServiceDefinition for server code in the generated
class.
Adds ServerCalls that contains the functionalities that is used by the
bindService() method in the generated class. It minimizes the logic in the
generated code.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76741797
Modification made to the old transport so this is a temporary CL.
Implementation is a bit hacky but given that the old transport is going
away, it is good for now.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76707856
Interfaces were corrected. ChannelImpl was updated to use same style of
exception handling of ServerImpl.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76702816
- Remove transport.proto and move status codes into Status.java with a little refactoring to make
status easier & more precise to use
- Move DeferredProtoInputStream into a proto subpackage
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76392172
I've modified ejona@'s original CL to fix some issues involved with
receiving status in trailers.
Also have a fix that should make the Java client properly flush when
writing.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76361782
1. Removed ByteSting related code (and copyFrom() method, since no one is using it).
2. Removed BuffersByteStringTest.java
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76308473
The fact that duplicate, slice, et al. don't retain() even though they
hold a reference to the originating ByteBuf seems very bug-prone.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76126682
Headers and trailers are only received on client-side, so we need a
client-specific listener. Close() also has slightly different semantics
between server-side and client-side.
Most of the changes are simple name changes, but AbstractServerStream does update to the new close() semantics.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76094225
We purposefully avoid going through the (de)framer, since close()
behavior is specific to whether on client or server.
AbstractClientStream and AbstractServerStream handle mapping the events
to appropriate semantics, but require stashing status/trailer for later
use.
It was very interesting getting to a point where we could support the old
and new protocol; that is probably the most detailed-oriented portion of
the CL. There are some interface hacks going on, but those will
naturally be removed when we trash the gRPC v1 framer.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76092186
This is required to be able to distinguish between the client having
finished sending and the RPC being complete.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=75819962