----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30379/#review70071 -----------------------------------------------------------
proton-j/src/main/java/org/apache/qpid/proton/amqp/transport2/Flow.java <https://reviews.apache.org/r/30379/#comment115027> do we want to specify the types for the Map here? proton-j/src/main/java/org/apache/qpid/proton/codec2/TransportTypesDecoder.java <https://reviews.apache.org/r/30379/#comment115040> I'm not quite following how this part works. How do you know that the data you have is a flow? Or is this a callback that is made when you've detected a flow in the decoding stream? If the latter is the case, what is actually invoking this? proton-j/src/main/java/org/apache/qpid/proton/codec2/TransportTypesEncoder.java <https://reviews.apache.org/r/30379/#comment115043> It might be worth introducing an Encodable interface with Encodable.encode(Encoder) and Encodable.decode(Decoder). That way you could keep the encode and decode logic together in the performative itself. I think having the encode/decode logic together would be good so that you could easily spot if they are asymmetric. It would also ease code generation if you end up going that route since you just need to generate the one class. I think it would also give you a good way to supply the missing piece of your decode picture that I mentioned above, since you could just have a general purpose decoder that holds a map from a descriptor to a factory. Then in your decoder when you get the descriptor callback you can lookup and construct the appropriate Encodable and delegate to it. - Rafael Schloming On Jan. 28, 2015, 8:04 p.m., rajith attapattu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30379/ > ----------------------------------------------------------- > > (Updated Jan. 28, 2015, 8:04 p.m.) > > > Review request for qpid and Rafael Schloming. > > > Repository: qpid-proton-git > > > Description > ------- > > Skeleton code for a possible approach for codec improvements in proton-j. > > > Diffs > ----- > > proton-j/src/main/java/org/apache/qpid/proton/amqp/transport2/Flow.java > PRE-CREATION > > proton-j/src/main/java/org/apache/qpid/proton/codec2/TransportTypesDecoder.java > PRE-CREATION > > proton-j/src/main/java/org/apache/qpid/proton/codec2/TransportTypesEncoder.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/30379/diff/ > > > Testing > ------- > > > Thanks, > > rajith attapattu > >