Commit Graph

187 Commits

Author SHA1 Message Date
Kun Zhang 7ab5e0e810 core: record server_elapsed_time on client (#2673)
It is defined as the time between the client sends out the headers, and the RPC finishes.
2017-02-03 13:29:06 -08:00
Carl Mastrangelo 566d0e9400 testing: change names of noopMarshaller to void marshaller
This is needed because in interceptor tests, often the types cannot
be changed.  The void methods stay for users who are writing tests
where they actually don't care about types.  The noop methods
require types to be specified.  This is for users who don't care
about the implementation.  These represent different levels of
commitment.

This eases the transition of code Mocking MethodDescriptor, which
breaks in this release.
2017-01-27 14:41:38 -08:00
Carl Mastrangelo 89bc2cd3b2 all: update to latest import ordering 2017-01-26 13:43:06 -08:00
Kun Zhang f088b81fc8 core: stop "testing" from depending on "core"'s test. (#2652)
Because "core"'s test source already depends on "testing", e.g.,
`core/src/test/java/io/grpc/internal/ServerCallImplTest.java` uses
`testing/src/main/java/io/grpc/internal/testing/StatsTestUtils.java`,
which forms a circular dependency.

This change moves the StatsContext setter accessors from "core"'s test
source to "testing".

Resolves #2651
2017-01-25 07:57:12 -08:00
Łukasz Strzałkowski 8882abaa09 core: rename attributes() -> getAttributes()
Make it consistent with its counterpart, ClientStream#getAttributes()
2017-01-23 15:04:51 -08:00
Carl Mastrangelo efbcd1f1b9 core: change method descriptor to be builder based 2017-01-23 12:29:35 -08:00
Eric Anderson f51316b84a testing: Move echo interceptors out of TestUtils
The interceptors are quite specific, and probably not helpful for
current testing strategies. They really are only useful for interop
testing. Moving them to interop-testing avoids them appearing to be in a
public API (even if that API is experimental).

No functional changes were made; just code movement.
2017-01-19 17:04:31 -08:00
Lukasz Strzalkowski 060eb45623 Rename attributes() to getAttributes() to make it consistent 2017-01-19 12:53:54 -08:00
Eric Anderson 1e99b299e1 all: ErrorProne fixes and avoid @Beta in Guava 2017-01-19 12:16:05 -08:00
Carl Mastrangelo ec7f00a272 core,testing: make MethodDescriptor final and add Test helper 2017-01-11 17:30:14 -08:00
Eric Anderson cc934b0b67 testing: Remove accidental cast to char in file IO
Also add forgotten close() for the InputStream.
2017-01-09 13:52:26 -08:00
ZHANG Dapeng 4a4f25ada4 weekly cleanup: errorprone, javastyle, unused (#2566) 2017-01-05 16:13:25 -08:00
Kun Zhang cce8eac56d core: upgrade census (now named instrumentation) to 0.3.0 (#2565)
In upstream, Census is renamed to "Instrumentation". `com.google.census` is renamed to `com.google.instrumentation.stats`.

In gRPC, "census" in every name is replaced by "stats".
2017-01-05 10:48:13 -08:00
Eric Gribkoff 257062fa88 interop-testing: Add custom_metadata interop test 2016-12-27 10:01:33 -08:00
Joey Bratton b6ebede94f testing: added junit rule for in-process servers
GrpcServerRule configures an in-process server and channel. It is
useful for asserting requests being made to a service. A consumer can
create a mock implementation of their service that records each
request, then make assertions on those records in their test.
2016-12-06 09:32:04 -08:00
ZHANG Dapeng e70f7b421c all: cleanup - errorprone, unused 2016-11-16 19:15:16 -08:00
ZHANG Dapeng 0e27eef168 core: fix bug when stream listener not set before stream closed
Resolves #1936

Two bugs fixed:
- NPE in `ServerImpl#streamCreated()` when stream listener not set before
  stream closed
- It is possible that `internalCancel()` is called during
  `InProcessClientStream#start()` due to early server `onComplete()` or server `onError()`,
  in this case no need to enlist `streams`, otherwise the channel can not be shutdown by `shutdown()`.
2016-11-09 15:21:11 -08:00
Eric Anderson e7ce41dd94 all: Style, unused, and errorprone fixes 2016-10-12 16:57:01 -07:00
Kun Zhang 132f7a9a33 core: Census integration for stats (#2262)
Highlights
==========

StatsTraceContext
-----------------

The bridge between gRPC library and Census. It keeps track of the total
payload sizes and the elapsed time of a Call. The rest of the gRPC code
doesn't invoke Census directly.

Context propagation
-------------------

StatsTraceContext carries CensusContext (and the upcoming TraceContext)
and is attached to the gRPC Context.

1. StatsTraceContext is created by ManagedChannelImpl, by calling
createClientContext(), which inherits the current CensusContext if available.

2. ManagedChannelImpl passes StatsTraceContext to ClientCallImpl, then
to the stream, then to the framer and deframer explicitly.

3. ClientCallImpl propagates the CensusContext to the headers.

1. ServerImpl creates a StatsTraceContext by implementing a new callback
method StatsTraceContext methodDetermined(MethodDescriptor, Metadata) on
ServerTransportListener.

2. NettyServerHandler calls methodDetermined() before creating the
stream, and passes the StatsTraceContext to the stream.

3. When ServerImpl creates the gRPC Context for the new ServerCall, it
calls the new method statsTraceContext() on ServerStream and puts the
StatsTraceContext in the Context.

Metrics recording
-----------------

1. Client-side start time: when ClientCallImpl is created

2. Server-side start time: when methodDetermined() is called

3. Server-side end time: in ServerStreamListener.closed(), but before
calling onComplete() or onCancel() on ServerCall.Listener.

4. Client-side end time: in ClientStreamListener.closed(), but before
calling onClonse() on ClientCall.Listener

Message sizes are recorded in MessageFramer and MessageDeframer. Both
the uncompressed and wire (possibly compressed) payload sizes are
counted.

TODOs
=====

The CensusContext created from headers on the server side should be
attached to the gRPC Context for the call.  It's not done at this moment
because Census lacks the proper API to do it. It only affects tracing
and resource accounting, but doesn't affect stats functionality
2016-10-06 17:15:24 -07:00
Carl Mastrangelo 141eed5ed0 core: change Metadata internals to avoid garbage creation
Before:
Benchmark                                                                   (headerCount)    Mode     Cnt        Score    Error  Units
InboundHeadersBenchmark.defaultHeaders_clientHandler                                  N/A    avgt      10      240.879 ±  4.903  ns/op
InboundHeadersBenchmark.defaultHeaders_serverHandler                                  N/A    avgt      10      882.354 ± 16.177  ns/op
InboundHeadersBenchmark.grpcHeaders_clientHandler                                     N/A    avgt      10      208.068 ±  5.380  ns/op
InboundHeadersBenchmark.grpcHeaders_serverHandler                                     N/A    avgt      10      477.604 ±  8.200  ns/op
OutboundHeadersBenchmark.convertClientHeaders                                           1  sample  234233      125.232 ± 11.903  ns/op
OutboundHeadersBenchmark.convertClientHeaders                                           5  sample  344367      264.343 ± 18.318  ns/op
OutboundHeadersBenchmark.convertClientHeaders                                          10  sample  392273      439.640 ±  2.589  ns/op
OutboundHeadersBenchmark.convertClientHeaders                                          20  sample  221506      855.115 ± 38.899  ns/op
OutboundHeadersBenchmark.convertServerHeaders                                           1  sample  253676      111.941 ±  2.742  ns/op
OutboundHeadersBenchmark.convertServerHeaders                                           5  sample  368499      248.255 ±  2.601  ns/op
OutboundHeadersBenchmark.convertServerHeaders                                          10  sample  390015      439.651 ± 11.040  ns/op
OutboundHeadersBenchmark.convertServerHeaders                                          20  sample  221807      840.435 ± 21.667  ns/op
OutboundHeadersBenchmark.encodeClientHeaders                                            1  sample  230139      432.866 ± 25.503  ns/op
OutboundHeadersBenchmark.encodeClientHeaders                                            5  sample  226901      765.095 ± 19.969  ns/op
OutboundHeadersBenchmark.encodeClientHeaders                                           10  sample  260495     1268.239 ± 21.850  ns/op
OutboundHeadersBenchmark.encodeClientHeaders                                           20  sample  311526     2059.973 ± 23.503  ns/op

After:

Benchmark                                                                   (headerCount)    Mode     Cnt        Score    Error  Units
InboundHeadersBenchmark.defaultHeaders_clientHandler                                  N/A    avgt      10      104.317 ±  1.973  ns/op
InboundHeadersBenchmark.defaultHeaders_serverHandler                                  N/A    avgt      10      395.666 ± 11.056  ns/op
InboundHeadersBenchmark.grpcHeaders_clientHandler                                     N/A    avgt      10       64.147 ±  4.076  ns/op
InboundHeadersBenchmark.grpcHeaders_serverHandler                                     N/A    avgt      10      228.299 ±  2.874  ns/op
OutboundHeadersBenchmark.convertClientHeaders                                           1  sample  252451      102.718 ±  2.714  ns/op
OutboundHeadersBenchmark.convertClientHeaders                                           5  sample  239976      225.812 ± 38.824  ns/op
OutboundHeadersBenchmark.convertClientHeaders                                          10  sample  258119      364.475 ± 57.217  ns/op
OutboundHeadersBenchmark.convertClientHeaders                                          20  sample  260138      676.950 ± 36.243  ns/op
OutboundHeadersBenchmark.convertServerHeaders                                           1  sample  276064      105.371 ±  1.859  ns/op
OutboundHeadersBenchmark.convertServerHeaders                                           5  sample  255128      190.970 ± 16.475  ns/op
OutboundHeadersBenchmark.convertServerHeaders                                          10  sample  272923      366.769 ± 28.204  ns/op
OutboundHeadersBenchmark.convertServerHeaders                                          20  sample  264797      641.961 ± 18.879  ns/op
OutboundHeadersBenchmark.encodeClientHeaders                                            1  sample  226078      425.262 ±  3.481  ns/op
OutboundHeadersBenchmark.encodeClientHeaders                                            5  sample  253606      675.488 ± 26.001  ns/op
OutboundHeadersBenchmark.encodeClientHeaders                                           10  sample  286556     1157.014 ± 12.923  ns/op
OutboundHeadersBenchmark.encodeClientHeaders                                           20  sample  345649     1874.806 ± 36.227  ns/op
2016-09-19 14:25:48 -07:00
Jakob Buchgraber 4aadf550ee netty: Fix receipt of ClosedChannelException instead of actual error. Fixes #1330.
Our API allows pings to be send even after the transport has been shutdown. We currently
don't handle the case, where the Netty channel has been closed but the NettyClientHandler
has not yet been removed from the pipeline, correctly. That is, we need to query the shutdown
status whenever we receive a ClosedChannelException.

Also, some cleanup.
2016-09-12 19:17:34 +02:00
Carl Mastrangelo 893ef44b4c all/tests: add a ClientCall and ServerCall suitable for use in tests 2016-09-02 17:09:49 -07:00
Kun Zhang 58d78dd0aa core: add ServerTransportFilter
Called whenever a ServerTransport is ready and terminated.  Has the
ability to modify transport attributes, which ServerCall.attributes()
are based on.

Related changes:

- Attribute keys for remote address and SSL session are now moved from
ServerCall to a neutral place io.grpc.Grpc, because they can also be
used from ServerTransportFilter, and probably will be used on the
client-side too.  The old keys on ServerCall is marked deprecated and
are equivalent to the new keys.
- Added transportReady() to ServerTransportListener.

Resolves #2132
2016-08-31 14:45:15 -07:00
Eric Anderson 7d464fcb02 inprocess: Avoid creating unnecessary threads
Implementations of ManagedClientTransport.start() are restricted from
calling the passed listener until start() returns, in order to avoid
reentrency problems with locks. For most transports this isn't a
problem, because they need additional threads anyway. InProcess uses no
additional threads naturally so ends up needing a thread just to
notifyReady. Now transports can just return a Runnable that can be run
after locks are dropped.

This was originally intended to be a performance optimization, but the
thread also causes nondeterminism because RPCs are delayed until
notifyReady is called. So avoiding the thread reduces needless fakes
during tests.
2016-08-02 13:16:36 -07:00
Louis Ryan c1ef8061d1 Fix selection of security Provider to conscruct SSLContext
Cleanup redundant API un TestUtils
Fix TlsTest to be ignored on JKD7 correctly
2016-07-18 14:25:27 -07:00
Louis Ryan f52b4e52cd Make the OkHTTP transport AppEngine friendly. AppEngine may support
conscrypt at some point which would allow ALPN to function
Clarify the SSLContext.getDefault is not used when constructing the
default SSLSocketFactory.
2016-07-13 18:27:43 -07:00
Jakob Buchgraber 7504b79f00 netty: add logging to find cause of ClosedChannelException.
- See #1330 for details.
- Also, Netty 4.1.2.Final comes with additional information where
a (usually statically cached) ClosedChannelException was triggered [1]

[1] https://github.com/netty/netty@e845670#diff-8c9a7d1d9b0fdb6c5aef2794d05a9f88
2016-07-09 14:50:39 +02:00
ZHANG Dapeng 8ed2dc8bec testware: fix flakes caused by pickUnusedPort
Resolves #1756

The thread-unsafe method `io.grpc.testing.TestUtils.pickUnusedPort` causes flakes (#1756) in windows. Need to avoid use of this method in test as in windows the tests are running in different jvms and concurrent calls of this method in multiple processes tend to return the same port number.

There are some usages of this method in benchmarks, so moved the method to `io.grpc.benchmarks.Utils` and the method will only be used in benchmarks and not in test.
2016-06-28 13:34:38 -07:00
Eric Anderson 5487ea8f54 Remove unused variables
This fixed a threading issue in ServerImpl because the unused variable
should have been used.
2016-06-24 12:11:03 -07:00
Eric Anderson 66ab956f9e Reapply "Eliminate MethodDescriptor from startCall and interceptCall for servers"
This reverts commit ef178304cb, which
itself was a revert.
2016-06-23 09:27:47 -07:00
Eric Anderson ef178304cb Revert "Eliminate MethodDescriptor from startCall and interceptCall for servers"
This reverts commit 3df1446deb.

The commit was adding to the difficulty of integration for testing. By
itself it isn't bad, so this is a temporary revert until the many other
commits are absorbed and then it will be reapplied.

This does have a manual edit for ClientCallsTest.
2016-06-20 15:18:18 -07:00
Kun Zhang 38b950f4f9 core: add transportInUse() to transport listener.
A transport is "in use" iff number of streams > 0. In following changes
the channel will use this information when deciding whether it should
transit to the IDLE mode (#1276).
2016-06-15 13:40:44 -07:00
Louis Ryan 3df1446deb Eliminate MethodDescriptor from startCall and interceptCall for servers
Make the MethodDescriptor a property of ServerCall
Move ServerMethodDefinition into ServerServiceDefinition
2016-06-13 14:39:58 -07:00
Eric Anderson c6fd94ca85 Implement shutdownNow
Fixes #448
2016-06-02 17:39:59 -07:00
Jakob Buchgraber d25b65bb53 testing: add tests for Netty bug where a channel would break after a RST_STREAM frame. Fixes #1682 2016-06-02 18:34:07 +02:00
Carl Mastrangelo 1cc76d8132 core,netty,okhttp: move user agent out of client call and into the transport 2016-05-25 15:11:42 -07:00
nmittler d9d4d8b70f Updating status codes to match the spec.
Fixes #1605
2016-05-09 13:55:50 -07:00
Carl Mastrangelo bc661e7fbb all: Finish adding tracking issues for ExperimentalApi 2016-05-03 16:15:57 -07:00
Jakob Buchgraber 46eefe34fb Strip cause from InProcessTransport between client and server. Fixes #1716 2016-04-29 23:36:59 +02:00
Jakob Buchgraber 9de87e3acd Add tests for call.cancel() from within messageRead. 2016-04-29 18:16:58 +02:00
Carl Mastrangelo d0d946ec9f new name 2016-04-18 16:21:53 -07:00
Carl Mastrangelo c4e8b1f10f Rename internal.Server to internal.TransportServer 2016-04-18 15:50:20 -07:00
Carl Mastrangelo b3bc7fc499 Try out using Truth library 2016-04-05 11:33:20 -07:00
Eric Anderson 3a920cdcca Add missing generics to some ServerCall usages 2016-03-17 17:05:25 -07:00
buchgr 3c68c053f7 Remove ReferenceCounted and add close() to ClientTransportFactory. Fixes #927 2016-03-17 00:31:04 +01:00
Lukasz Strzalkowski 6a67a97a73 Add attributes to ServerCall 2016-03-16 15:39:42 -07:00
Kun Zhang 2491402036 Remove or use unused variables. 2016-03-04 17:05:23 -08:00
Eric Anderson 1170afd168 Add transport test for Netty
Netty client shutdown would race with the negotiation handling and
circumvent AbstractBufferingHandler. Use a new command in order to
leave channel.close() available for abrupt killing of the connection
when connecting.

ping_afterTermination was previously racey that made it succeed. After
fixing the test, Netty would consistently fail to call callback. After
fixing Netty to fail the callback it was not using the right status
because when Netty's channel is closed none of our handlers are run.
This reliably fails the future with ClosedChannelException, which is
useless, so now we special-case that exception and fill in the reason
for shutdown.

To prevent accidentally reporting Status.OK, the transports no longer
use OK when calling transportShutdown. The OK status was already no
longer being consumed, since keying off whether transportReady was
called is more helpful.

This fixes #1330
2016-03-01 17:43:30 -08:00
Eric Anderson b17a249fc4 Create new AbstractTransportTest for Transports
This is lower-level than the existing AbstractTransportTest. It should
be used by all transports, but InProcessTransport is the only one as
part of this commit.
2016-02-25 16:23:17 -08:00
Carl Mastrangelo 42d787288e Use default keystore 2016-02-22 17:18:32 -08:00
Eric Anderson 484c46c62b Revert minor grammar tweaks to avoid syncing readme
The certs are used a lot of places, and we would prefer they stay
identical. This small grammar changes from 95d7bfd don't seem to
contribute enough for the effort envolved to sync.
2016-01-25 14:23:43 -08:00
Matt Hildebrand 95d7bfd2b9 Add some initial integration tests for GRPC's TLS support.
Tests run using Jetty ALPN only, not using OpenSSL.
2016-01-21 13:46:19 -08:00
Carl Mastrangelo 3fef40368d Make TestUtils able to read from input stream. This makes it easier to pass in an input stream from a resource 2015-12-07 17:28:25 -08:00
Xudong Ma 975c38e77c Keep our certs used for testing the same with their internal version 2015-12-04 13:45:48 -08:00
Julien Boeuf 088def1985 Updating the server1 cert so that it can be used with Go.
The encoding of the issuer field in this cert is now a PRINTABLESTRING
as opposed to UTF8STRING in the previous server1.pem which was causing
the Go issue.

- https://github.com/grpc/grpc/pull/4096
- https://github.com/grpc/grpc-go/pull/442

Sorry I should have done this java PR and have it approved before
submitting the grpc-go and grpc PRs.
2015-11-17 21:43:45 -08:00
Eric Anderson 1cfba96d17 Enforce sending headers before messages on server
ServerCall already had "headers must be sent before any messages, which
must be sent before closing," but the implementation did not enforce it
and our async server handler didn't obey.

The benefit of forcing sending headers first is that it removes the only
implicit call in our API and interceptors dealing just with metadata
don't need to override sendMessage. The implicit behavior was bug-prone
since it wasn't obvious you were forgetting that headers may not be
sent.
2015-09-11 17:39:40 -07:00
Eric Anderson d966163bbb Mark classes in testing as ExperimentalApi
We've not done any real work to make sure they have reasonable APIs.
2015-09-10 15:56:58 -07:00
Xudong Ma 0a51f0fbd9 Move StreamRecorder to testing package. 2015-09-01 09:15:03 -07:00
Carl Mastrangelo a508c1d4f5 Remove Headers 2015-08-24 11:41:10 -07:00
Xudong Ma 7dbca92435 Remove deprecated method. 2015-08-18 10:03:17 -07:00
Carl Mastrangelo 572f4332a7 Remove Trailers 2015-08-13 17:11:29 -07:00
Carl Mastrangelo b141093b3b Make serverInterceptor use MethodDescriptor 2015-08-07 09:28:29 -07:00
Carl Mastrangelo e76b8e7ee8 Renamed Server payload to message 2015-08-05 17:10:37 -07:00
Jack Coughlin 1ac64bd09d Remove ServerDelayInterceptor from AbstractTransportTest 2015-07-27 07:25:41 -07:00
Jack Coughlin 3e26b993ce Enforce request deadline
Use a ScheduledExecutorService in the ChannelImpl to terminate the
request by closing the ClientStream with status DEADLINE_EXCEEDED
2015-07-14 16:47:45 -07:00
Xudong Ma 8f51457ee1 Rename getSslSocketFactoryForCertainCert to be newSslSocketFactoryForCa.
Fixes #560
2015-06-25 14:46:05 -07:00
Jack Coughlin 77878a04ee Pass timeout header in ChannelImpl 2015-06-17 16:03:13 -07:00
Eric Anderson 424c7e64c3 Avoid GCM in unit tests
GCM is very slow, and doesn't provide any benefit in unit tests. Even if
we were using tcnative and GCM is fast, using more available ciphers in
tests still makes sense. With this change building with Java 7 works
again, although that isn't the reason for the change.

On my machine with parallel building, it cuts full build time from
92 seconds to 39 seconds. For an incremental build after only changing
an interop test, the build time is cut from 73 seconds to 15 seconds.
2015-06-16 12:36:57 -07:00
nmittler 4ee2a6584a Allowing Netty TLS bootstrap handler to be sharable.
Fixes #504
2015-06-03 09:42:08 -07:00
nmittler f770ffb18f Making test certs more shareable
To use the test certs a module has to depend on the grpc-interop-testing module, which doesn't really make sense.  I'm moving the certs to the grpc-testing module, which is meant to be a sort of testing common area for all of our modules.
2015-05-28 11:34:25 -07:00
Kun Zhang 0d89d3d1bc Fix the issue where the intecepting call fails in start(), does not
call super.start(), and makes the subsequent use of other methods on the
call throw IllegalStateException.

Create ClientInterceptors.CheckedForwardingCall that handles exception
in start logic.

Create Forwarding[Server]Call[Listener] for generic decoration use
cases, with an abstract delegate() for flexibility.

Create SimpleForwarding[Server]Call[Listener] to replace now deprecated
forwarding classes.
2015-04-09 15:56:03 -07:00
nmittler f83145865a Removing all references to "stubby" 2015-01-27 11:25:25 -08:00
nmittler 19052499f7 Removing Maven build 2015-01-27 08:57:37 -08:00
nathanmittler 164b734aa9 Adding gradle build for Java grpc
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82152044
2015-01-08 14:43:21 -08:00
nathanmittler 66ce6677b2 Updating version of gRPC maven build to 0.1.0-SNAPSHOT.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82151533
2015-01-08 14:43:20 -08:00
lryan 56e307fcb6 Add BSD license header to all source files
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81447025
2015-01-08 14:43:17 -08:00
lryan 7f55e8163a Allow use of a LocalChannel with Netty & HTTP2
Remove old in-process handling
Update tests and benchmarks

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81381986
2015-01-08 14:43:15 -08:00
lryan c5e70c2310 Remove StreamState and use inboundPhase/outboundPhase instead
Remove synchronization on stateLock as we are not required to be thread safe
Add better toString for stream impls
Internal cleanup of various 'status' fields in AbstractClientStream
Remove 'stashTrailers' as we've already extracted status in layer above correctly

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=80678356
2015-01-08 14:43:12 -08:00
nathanmittler ffc18f6c57 Adding MOE configuration for grpc_java.
The TestService proto is temporarily supplied as a generated jar (until the open source protoc compiler supports grpc).

Copies of messages.proto, empty.proto, and message_set.proto are scrubbed and included in the source under integration-testing.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78711468
2015-01-08 14:43:02 -08:00
nathanmittler 29cbef1f9b Renaming gRPC-java "newtransport" package to just "transport".
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78596663
2015-01-08 14:43:00 -08:00
nathanmittler 0304b3d6b2 Cleaning up various compiler warnings in preparation for opensource.
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
2015-01-08 14:42:59 -08:00
lryan 28497e3c7e Add support for servers to deliver response headers
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
2015-01-08 14:42:56 -08:00
lryan 125c1cee69 Delete Session, Operation and ALL of its associated cruft.
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
2015-01-08 14:42:53 -08:00
ejona 653ffd98d2 ServerImpl
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
2015-01-08 14:42:50 -08:00
lryan eb3fc58ce5 Create an in-process adapter between ClientTransport and HandlerRegistry
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=76604751
2015-01-08 14:42:50 -08:00
ejona 070e308763 Have stricter dependencies and build in modules.
This is useful in making sure we don't have stray dependencies and brings us closer to compiling for platforms like Android. We can now remove unwanted dependencies one module at a time, or get individual modules to build on Android.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=73849551
2015-01-08 14:42:38 -08:00
ejona 07d3f6a202 Move gRPC core to third_party
Half our tests still need to be moved, but that will be for a later
time.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=67023748
2015-01-08 14:42:19 -08:00