[ 
https://issues.apache.org/jira/browse/AVRO-76?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735775#action_12735775
 ] 

Doug Cutting commented on AVRO-76:
----------------------------------

 - Requestor should not have fields for metadata: that's not thread safe. 
Rather, each request should create a new metadata map, pass it to plugins to be 
populated, write it to the server, then drop it.  Similarly, a new connect 
metadata map should be created per handshake.
 - It might be simpler if {send,recieve}{error,response} passed an isError 
boolean, removing two methods from the plugin API.
 - I don't see a need for the clearRPCPlugins method.
 - Long-term, we're going to want to pass more data to these plugins.  E.g., 
someone is going to want the transciever or somesuch.  I suggest that we should 
use context objects as parameters, that we can add methods to to access new 
data.  So, we might have a SessionContext that has a getProtocol()  and 
getSessionMeta() method, and a RequestContext that extends this with methods 
getRequestMeta(), getMessage(), getRequest(), etc., and a ResponseContext that 
extends this with getResponseMeta(), getResponse(), isError(), etc..  Then, for 
example, we might call serverSendResponse(RequestContext, ResponseContext).  
Does that make sense?

> Add plug-in mechanism for manipulating per-call metadata
> --------------------------------------------------------
>
>                 Key: AVRO-76
>                 URL: https://issues.apache.org/jira/browse/AVRO-76
>             Project: Avro
>          Issue Type: Sub-task
>          Components: java
>            Reporter: George Porter
>            Assignee: George Porter
>         Attachments: AVRO-76.patch, AVRO-76.patch, AVRO-76.patch, 
> AVRO-76.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to