You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Amila Maharachchi (JIRA)" <ji...@apache.org> on 2011/01/10 06:05:45 UTC
[jira] Created: (SYNAPSE-715) Refactoring and improving the code in
HttpCoreNIOListener, ServerHandler and ServerWorker classes
Refactoring and improving the code in HttpCoreNIOListener, ServerHandler and ServerWorker classes
-------------------------------------------------------------------------------------------------
Key: SYNAPSE-715
URL: https://issues.apache.org/jira/browse/SYNAPSE-715
Project: Synapse
Issue Type: Improvement
Components: Transports
Reporter: Amila Maharachchi
Priority: Minor
While I was going through the code of nhttp transport, I found some places where I thought the code can be refactored in order to make it more clear and nicer. Current code has quite a lot of parameters passing to the ServerHandler and ServerWorker contructors (respectively 8 and 11). There are quite a few common parameters among these which are passed from the HttpCoreNIOListener to ServerHandler and then to the ServerWorker.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Updated: (SYNAPSE-715) Refactoring and improving the code in
HttpCoreNIOListener, ServerHandler and ServerWorker classes
Posted by "Amila Maharachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amila Maharachchi updated SYNAPSE-715:
--------------------------------------
Attachment: synapse_nhttp_refactor.patch
I thought of introducing a new class ListenerContext and include those common parameters in it. I also introduced another class RequestProcessingContext which includes some parameters which are passed to the ServerWorker by the ServerHandler. These entities are involved in processing the request. By introducing these two classes I was able to make the code clear than the existing one.
During this refactoring process, I added some missing documentation parts and also corrected some spelling mistakes in the comments. Please go through the patch I have provided and if it is suitable to be applied, please apply it.
If there are any improvements to be done in the patch provided please do comment (If the class name RequestProcessingContext is not suitable, please propose a suitable class name)
> Refactoring and improving the code in HttpCoreNIOListener, ServerHandler and ServerWorker classes
> -------------------------------------------------------------------------------------------------
>
> Key: SYNAPSE-715
> URL: https://issues.apache.org/jira/browse/SYNAPSE-715
> Project: Synapse
> Issue Type: Improvement
> Components: Transports
> Reporter: Amila Maharachchi
> Priority: Minor
> Attachments: synapse_nhttp_refactor.patch
>
>
> While I was going through the code of nhttp transport, I found some places where I thought the code can be refactored in order to make it more clear and nicer. Current code has quite a lot of parameters passing to the ServerHandler and ServerWorker contructors (respectively 8 and 11). There are quite a few common parameters among these which are passed from the HttpCoreNIOListener to ServerHandler and then to the ServerWorker.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-715) Refactoring and improving the code
in HttpCoreNIOListener, ServerHandler and ServerWorker classes
Posted by "Amila Maharachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979487#action_12979487 ]
Amila Maharachchi commented on SYNAPSE-715:
-------------------------------------------
Thanks Ruwan and Supun for your kind suggestions. I will rename the ListenerContext class to NhttpListenerContext (which will give a more clear idea).
Regarding the refactoring of the sender, I didnt consider it because there is no such issue (too many parameters being passed and code is not clear because of it) in the sender. I'll consider creating a sender context too.
I'll also look at the mistakes done in mixing context and configuration and come up with a suitable solution.
Will provide another patch after resolving the above mentioned issues. Meanwhile, any other feedbacks are welcome.
Thanks,
Amila.
> Refactoring and improving the code in HttpCoreNIOListener, ServerHandler and ServerWorker classes
> -------------------------------------------------------------------------------------------------
>
> Key: SYNAPSE-715
> URL: https://issues.apache.org/jira/browse/SYNAPSE-715
> Project: Synapse
> Issue Type: Improvement
> Components: Transports
> Reporter: Amila Maharachchi
> Priority: Minor
> Attachments: synapse_nhttp_refactor.patch, synapse_nhttp_refactor_2.patch
>
>
> While I was going through the code of nhttp transport, I found some places where I thought the code can be refactored in order to make it more clear and nicer. Current code has quite a lot of parameters passing to the ServerHandler and ServerWorker contructors (respectively 8 and 11). There are quite a few common parameters among these which are passed from the HttpCoreNIOListener to ServerHandler and then to the ServerWorker.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-715) Refactoring and improving the code
in HttpCoreNIOListener, ServerHandler and ServerWorker classes
Posted by "Supun Kamburugamuva (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979476#action_12979476 ]
Supun Kamburugamuva commented on SYNAPSE-715:
---------------------------------------------
I think it is better to rename RequestProcessingContext to ListnerRequest or SourceRequest.
Thanks,
Supun..
> Refactoring and improving the code in HttpCoreNIOListener, ServerHandler and ServerWorker classes
> -------------------------------------------------------------------------------------------------
>
> Key: SYNAPSE-715
> URL: https://issues.apache.org/jira/browse/SYNAPSE-715
> Project: Synapse
> Issue Type: Improvement
> Components: Transports
> Reporter: Amila Maharachchi
> Priority: Minor
> Attachments: synapse_nhttp_refactor.patch
>
>
> While I was going through the code of nhttp transport, I found some places where I thought the code can be refactored in order to make it more clear and nicer. Current code has quite a lot of parameters passing to the ServerHandler and ServerWorker contructors (respectively 8 and 11). There are quite a few common parameters among these which are passed from the HttpCoreNIOListener to ServerHandler and then to the ServerWorker.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-715) Refactoring and improving the code
in HttpCoreNIOListener, ServerHandler and ServerWorker classes
Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979481#action_12979481 ]
Ruwan Linton commented on SYNAPSE-715:
--------------------------------------
1. It looks to me that you have mixed context information and the configuration information both on this new context, I guess it is good to separate out configurations from the Context information. I guess there is already a NhttpConfiguration class?
2. The name ListenerContext is too abstract, ListenerContext gives me the understanding that this is commons to all axis2 transports, but it is not.
3. Why don't we do the same for the sender as well, otherwise it is inconsistent.
Supun, why do you think it should be named ListenerRequest?? It is not a request?
> Refactoring and improving the code in HttpCoreNIOListener, ServerHandler and ServerWorker classes
> -------------------------------------------------------------------------------------------------
>
> Key: SYNAPSE-715
> URL: https://issues.apache.org/jira/browse/SYNAPSE-715
> Project: Synapse
> Issue Type: Improvement
> Components: Transports
> Reporter: Amila Maharachchi
> Priority: Minor
> Attachments: synapse_nhttp_refactor.patch, synapse_nhttp_refactor_2.patch
>
>
> While I was going through the code of nhttp transport, I found some places where I thought the code can be refactored in order to make it more clear and nicer. Current code has quite a lot of parameters passing to the ServerHandler and ServerWorker contructors (respectively 8 and 11). There are quite a few common parameters among these which are passed from the HttpCoreNIOListener to ServerHandler and then to the ServerWorker.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Updated: (SYNAPSE-715) Refactoring and improving the code in
HttpCoreNIOListener, ServerHandler and ServerWorker classes
Posted by "Amila Maharachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amila Maharachchi updated SYNAPSE-715:
--------------------------------------
Attachment: synapse_nhttp_refactor_2.patch
Thanks for the feedback. I renamed the class to ListenerRequest and attached the new patch herewith.
> Refactoring and improving the code in HttpCoreNIOListener, ServerHandler and ServerWorker classes
> -------------------------------------------------------------------------------------------------
>
> Key: SYNAPSE-715
> URL: https://issues.apache.org/jira/browse/SYNAPSE-715
> Project: Synapse
> Issue Type: Improvement
> Components: Transports
> Reporter: Amila Maharachchi
> Priority: Minor
> Attachments: synapse_nhttp_refactor.patch, synapse_nhttp_refactor_2.patch
>
>
> While I was going through the code of nhttp transport, I found some places where I thought the code can be refactored in order to make it more clear and nicer. Current code has quite a lot of parameters passing to the ServerHandler and ServerWorker contructors (respectively 8 and 11). There are quite a few common parameters among these which are passed from the HttpCoreNIOListener to ServerHandler and then to the ServerWorker.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Resolved: (SYNAPSE-715) Refactoring and improving the code
in HttpCoreNIOListener, ServerHandler and ServerWorker classes
Posted by "Supun Kamburugamuva (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Supun Kamburugamuva resolved SYNAPSE-715.
-----------------------------------------
Resolution: Fixed
Fixed in the trunk
> Refactoring and improving the code in HttpCoreNIOListener, ServerHandler and ServerWorker classes
> -------------------------------------------------------------------------------------------------
>
> Key: SYNAPSE-715
> URL: https://issues.apache.org/jira/browse/SYNAPSE-715
> Project: Synapse
> Issue Type: Improvement
> Components: Transports
> Reporter: Amila Maharachchi
> Priority: Minor
> Attachments: synapse_nhttp_refactor.patch, synapse_nhttp_refactor_2.patch
>
>
> While I was going through the code of nhttp transport, I found some places where I thought the code can be refactored in order to make it more clear and nicer. Current code has quite a lot of parameters passing to the ServerHandler and ServerWorker contructors (respectively 8 and 11). There are quite a few common parameters among these which are passed from the HttpCoreNIOListener to ServerHandler and then to the ServerWorker.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-715) Refactoring and improving the code
in HttpCoreNIOListener, ServerHandler and ServerWorker classes
Posted by "Supun Kamburugamuva (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979485#action_12979485 ]
Supun Kamburugamuva commented on SYNAPSE-715:
---------------------------------------------
I was thinking about request as well. But we have two requests. One is from the listener side and the other one is for the sender side. At the moment the sender side request is called Axis2Request. That is why I thought of some context for the Request. I'm also not that confident with ListenerContext.
> Refactoring and improving the code in HttpCoreNIOListener, ServerHandler and ServerWorker classes
> -------------------------------------------------------------------------------------------------
>
> Key: SYNAPSE-715
> URL: https://issues.apache.org/jira/browse/SYNAPSE-715
> Project: Synapse
> Issue Type: Improvement
> Components: Transports
> Reporter: Amila Maharachchi
> Priority: Minor
> Attachments: synapse_nhttp_refactor.patch, synapse_nhttp_refactor_2.patch
>
>
> While I was going through the code of nhttp transport, I found some places where I thought the code can be refactored in order to make it more clear and nicer. Current code has quite a lot of parameters passing to the ServerHandler and ServerWorker contructors (respectively 8 and 11). There are quite a few common parameters among these which are passed from the HttpCoreNIOListener to ServerHandler and then to the ServerWorker.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org