I don't know what Netty's API requirements are. In the google protobuf library, the ExtensionRegistry is optional; not providing one is the same as providing one with no extensions. But that should be about right; you only need to ensure that the handlers provide an ExtensionRegistry with what they want.
Only message types can be extended. If you are asking if a message type that's used as an extension can also have extensions, then yes, e.g.:
message Foo {
extensions 1 to max;
}
message Bar {
extensions 1 to max;
}
extend Foo {
optional Bar bar = 1;
}
extend Bar {
optional int32 int32_field = 1;
}
The ExtensionRegistry would need to contain the defintions for all extensions in the entire message structure that you want to use.
Thanks for your prompt reply!
If I understand you correctly: I provide an ExtensionRegistry to Netty's decoder that has no entries, just to avoid the null exception. I then reserialize the message and pass it to the appropriate handler, who decodes it using their own ExtensionRegistry that knows about any applicable extensions. I presume that an extension can also have extensions?
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.