Commit Graph

47 Commits

Author SHA1 Message Date
Jihun Cho eda5e2e32c
protobuf: StatusProto#fromStatusAndTrailers fall-back use status (#6278) 2019-10-15 08:49:08 -07:00
Carl Mastrangelo 93ead9d666
protobuf: make extension registry method experimental 2018-09-28 17:18:28 -07:00
Carl Mastrangelo 32bb5ba156
protobuf: expose ExtensionRegistry setter 2018-09-25 10:49:43 -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
Carl Mastrangelo 13ca42aff6
protobuf{,lite,nano}: make more classes final
- Split anonymous classes in named and final classes
- Fix some Javadocs and annotate when things were added.
2018-06-19 15:30:12 -07:00
ZHANG Dapeng d965561f8f
protobuf: add @since for new API 2018-05-22 15:29:47 -07:00
Carl Mastrangelo 0906937db5
protobuf: add import dropped on merge 2018-05-21 18:06:59 -07:00
Carl Mastrangelo 8635de36a6
protobuf: add metadataMarshaller to ProtoUtils 2018-05-21 16:26:27 -07:00
Carl Mastrangelo e3f8891f57
protobuf,examples: move json encoding to examples 2018-05-17 15:48:45 -07:00
Carl Mastrangelo 60a0b0c471
all: normalize copyright header 2018-05-03 14:55:21 -07:00
Shohei Kamimori d68b2cd74a protobuf: add test for ProtoUtils (#3838) 2018-04-06 10:10:08 -07:00
Eric Anderson d99d8d99d8 protobuf: fix @since for fromStatusAndTrailers
It was added in 1e9bd9a8 which was initially released in v1.11.0.
2018-04-03 09:16:56 -07:00
Carl Mastrangelo 1e9bd9a84e
protobuf: expose Status specific Unwrapper 2018-02-28 16:49:37 -08:00
Carl Mastrangelo 9747994ac6
protobuf: add since tags to StatusProto javadocs 2018-02-28 16:43:35 -08:00
Lukasz Strzalkowski 731bbefb17 core, compiler, protobuf: introduce MethodDescriptor#setSchemaDescriptor 2017-09-11 09:57:03 -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 Gribkoff 37e2131dc9 protobuf: make toStatusProto return null when metadata key is absent 2017-05-30 11:47:20 -07:00
ZHANG Dapeng bb978bac31 doc: initiate some package javadoc
Initated package javadoc for 
* `io.grpc.stub`, 
* `io.grpc.auth`, 
* `io.grpc.util`, 
* `io.grpc.protobuf`, 
* `io.grpc.protobuf.lite`,
* `io.grpc.protobuf.nano`
2017-05-10 11:29:07 -07:00
Muxi Yan f674776a6c Add/Fix some docs (#2970)
* Add/Fix some docs

* Address comments

* Address comments

* Address comments

* Add remarks

* Build fixes

* Revision

* More revision
2017-05-04 10:57:49 -07:00
Eric Gribkoff 6cf8f059c9 protobuf: utility methods for com.google.rpc.Status 2017-03-21 14:03:46 -07:00
Carl Mastrangelo 89bc2cd3b2 all: update to latest import ordering 2017-01-26 13:43:06 -08:00
Carl Mastrangelo 3144a4fcd6 proto: remove deprecated methods 2017-01-11 13:23:02 -08:00
dave 540f70e870 ProtoUtil.jsonMarshaller can be supplied a JsonFormat Parser and Printer
This allows for customizing the printer and parser behaviour
2016-11-02 15:24:13 -07:00
Eric Gribkoff abffc76da2 addressing reviewer comments 2016-10-28 08:45:32 -07:00
Eric Gribkoff aff1cac7da Compiler/core changes to support the proto reflection API
core: adds @Nullable Object getAttachedObject() to ServiceDescriptor

compiler: Plumbing necessary to access proto file descriptors via
the reflection service
2016-10-28 08:45:32 -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
Eric Anderson f83db83391 Add unit tests for proto-based JSON marshaller 2016-04-29 10:31:43 -07:00
Carl Mastrangelo 702518af22 Allow use of a global ExtensionRegistry 2016-04-15 17:36:45 -07:00
Eric Anderson 99a6d8de27 Add native support for Protobuf Lite
Lite already worked by using the protobuf project, but would bring in
extra dependencies that are not intended to work with lite. Although
protobuf is not yet providing a lite package on Maven Central, we will
be able to swap to it once it is available.

There isn't any new original code in the Java portion, except for a new
overload in ProtoUtils that accepts Message instead of MessageLite.
Depending on Message in ProtoUtils allows us to support extra features
out-of-the-box without any changes to the generated code. For example,
JSON encoding could be supported in this way if Marshaller is enhanced.

However, now codegen must be aware of Lite in order to choose with Util
class to use. That is new code.
2016-03-22 15:40:51 -07:00
Carl Mastrangelo 9913d1d0fc Initial attempt at json example 2016-03-10 11:33:06 -08:00
Eric Anderson 52bd63f88e Improve test coverage of ProtoUtils
NanoUtilsTest was updated to use an invalid proto instead of an
IOException to match ProtoUtils and to be more realistic.
2016-02-06 17:22:37 -08:00
Eric Anderson 4573836df9 Fix NPE in ProtoInputStream.drainTo
Fixes #1225
2016-02-01 15:16:17 -08:00
Carl Mastrangelo 05b7d75029 Re add support for periods in metadata key names 2015-11-10 15:59:42 -08:00
Carl Mastrangelo 2ad35b8269 Add Header name character restrictions 2015-11-10 11:20:04 -08:00
Eric Anderson cea8e8e4a7 Add tests for nano proto
Since some of the tests would need only minor modification to work for
normal proto, normal proto got a few more tests as well.
2015-10-28 10:00:41 -07:00
Eric Anderson 47a7ccf0cb Avoid Parser for normal protobuf
Eventually, this could avoid allocating Parser, since we can use
newBuilderForType().mergeFrom(). This would primarily benefit Lite
proto.
2015-09-03 17:31:16 -07:00
Kun Zhang bd23a8d693 Upgrade to protobuf-3.0.0-beta-1 2015-08-31 09:26:20 -07:00
nmittler 0b57f56bf0 Reducing the size of the "large" proto in ProtoUtilsTest.
Hoping to eliminate flakes on Travis.

Fixes #859
2015-08-24 08:40:58 -07:00
nmittler 573f79a06d Remove proto size restriction when parsing protos. 2015-08-20 14:10:49 -07:00
Kun Zhang f681b5f8be Move Marshaller into MethodDescriptor 2015-08-11 10:53:38 -07:00
Eric Anderson 3059b70283 Optimize protobuf serializer for in-memory transport
In-memory transport provides back the same input stream that was
provided, so if we notice our own object simply avoid serializing.

DeferredProtoInputStream is made package-private because 1) it doesn't
seem we need it to be public and 2) the change depends on it being
package-private so the constructor can be changed.
2015-07-22 15:54:39 -07:00
Kun Zhang a6585e36ed Replace DeferredInputStream with interface Drainable.
- Rename flushTo() to drainTo().
- Remove flushTo() from DeferredNanoProtoInputStream (which is renamed
  to NanoProtoInputStream), because the optimization is not implemented.
- Rename DeferredProtoInputStream to ProtoInputStream.

 #529
2015-07-20 17:04:49 -07:00
Louis Ryan 641fc288fc Add support for indeterminate length messages. This will make using GRPC easier for non-proto payload types.
Sync to head
2015-05-26 15:44:46 -07:00
Eric Anderson 3666de4427 Use more precise names for protobuf and nano
io.grpc.nano sort of seems like a "small" version of grpc-java. And
io.grpc.proto could also mean multiple things. Using "protobuf"
and "protobuf nano" gets us consistent names that are still
understandable, predictable, and more similar to protobuf project
itself.
2015-04-10 16:35:23 -07:00
Eric Anderson e23f899491 Split protobuf into its own project
We don't want core to depend on protobuf.
2015-04-10 15:50:56 -07:00