You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "William R. Speirs (JIRA)" <ji...@apache.org> on 2012/08/08 21:05:21 UTC

[jira] [Created] (HTTPCORE-308) Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic

William R. Speirs created HTTPCORE-308:
------------------------------------------

             Summary: Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic
                 Key: HTTPCORE-308
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-308
             Project: HttpComponents HttpCore
          Issue Type: Bug
          Components: HttpCore, HttpCore NIO
    Affects Versions: 4.2.1
            Reporter: William R. Speirs


Currently both HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver have a single method lookup which takes a URI to resolve into a HttpRequestHandler/HttpAsyncRequestHandler. These two interfaces could be made more generic by accepting an HttpRequest instead so that routing can be performed based upon other parts of the request like the Host header.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCORE-308) Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444793#comment-13444793 ] 

Oleg Kalnichevski commented on HTTPCORE-308:
--------------------------------------------

William,
The @since tag on UriHttpAsyncRequestHandlerMapper looks wrong. Otherwise the patch looks good to me. Please go ahead and commit it. You should now have commit privileges.

Oleg
                
> Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic
> --------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-308
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-308
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore, HttpCore NIO
>    Affects Versions: 4.2.1
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-308.diff, HTTPCORE-308v2.diff, HTTPCORE-308v3.diff
>
>
> Currently both HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver have a single method lookup which takes a URI to resolve into a HttpRequestHandler/HttpAsyncRequestHandler. These two interfaces could be made more generic by accepting an HttpRequest instead so that routing can be performed based upon other parts of the request like the Host header.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCORE-308) Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic

Posted by "William R. Speirs (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William R. Speirs updated HTTPCORE-308:
---------------------------------------

    Issue Type: Improvement  (was: Bug)
    
> Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic
> --------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-308
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-308
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore, HttpCore NIO
>    Affects Versions: 4.2.1
>            Reporter: William R. Speirs
>
> Currently both HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver have a single method lookup which takes a URI to resolve into a HttpRequestHandler/HttpAsyncRequestHandler. These two interfaces could be made more generic by accepting an HttpRequest instead so that routing can be performed based upon other parts of the request like the Host header.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCORE-308) Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic

Posted by "William R. Speirs (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William R. Speirs updated HTTPCORE-308:
---------------------------------------

    Attachment: HTTPCORE-308.diff

First cut at making HttpRequestHandlerResolver more generic. No work has been done on NIO as I want feedback on what was done here.

Also, HttpService was deprecated in favor of a new HttpServer which removes the deprecated code from HttpService.
                
> Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic
> --------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-308
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-308
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore, HttpCore NIO
>    Affects Versions: 4.2.1
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-308.diff
>
>
> Currently both HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver have a single method lookup which takes a URI to resolve into a HttpRequestHandler/HttpAsyncRequestHandler. These two interfaces could be made more generic by accepting an HttpRequest instead so that routing can be performed based upon other parts of the request like the Host header.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCORE-308) Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic

Posted by "William R. Speirs (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William R. Speirs updated HTTPCORE-308:
---------------------------------------

    Attachment: HTTPCORE-308v2.diff

Dropped the HttpServer class and simply modified HttpService. I kept the adapter class private to HttpServer as it's not really needed outside of this class. Again, the same basic changes will need to be made on the async side... just checking these first.
                
> Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic
> --------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-308
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-308
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore, HttpCore NIO
>    Affects Versions: 4.2.1
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-308.diff, HTTPCORE-308v2.diff
>
>
> Currently both HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver have a single method lookup which takes a URI to resolve into a HttpRequestHandler/HttpAsyncRequestHandler. These two interfaces could be made more generic by accepting an HttpRequest instead so that routing can be performed based upon other parts of the request like the Host header.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCORE-308) Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431350#comment-13431350 ] 

Oleg Kalnichevski commented on HTTPCORE-308:
--------------------------------------------

Bill,

I think there is no need to deprecate the entire HttpService class. It should be sufficient to deprecate the old constructor that takes HttpRequestHandlerResolver as a parameter and provide a new one that takes HttpRequestHandlerMapper. The deprecated constructor can use an adaptor class to translate HttpRequestHandlerMapper API calls to HttpRequestHandlerResolver API.

Oleg 
                
> Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic
> --------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-308
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-308
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore, HttpCore NIO
>    Affects Versions: 4.2.1
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-308.diff
>
>
> Currently both HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver have a single method lookup which takes a URI to resolve into a HttpRequestHandler/HttpAsyncRequestHandler. These two interfaces could be made more generic by accepting an HttpRequest instead so that routing can be performed based upon other parts of the request like the Host header.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCORE-308) Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic

Posted by "William R. Speirs (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William R. Speirs updated HTTPCORE-308:
---------------------------------------

    Attachment: HTTPCORE-308v3.diff

OK, I think I've got everything we want here. Updated both core and core-nio, and provided default (URI) mappers for both environments. Let me know...
                
> Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic
> --------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-308
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-308
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore, HttpCore NIO
>    Affects Versions: 4.2.1
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-308.diff, HTTPCORE-308v2.diff, HTTPCORE-308v3.diff
>
>
> Currently both HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver have a single method lookup which takes a URI to resolve into a HttpRequestHandler/HttpAsyncRequestHandler. These two interfaces could be made more generic by accepting an HttpRequest instead so that routing can be performed based upon other parts of the request like the Host header.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Resolved] (HTTPCORE-308) Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic

Posted by "William R. Speirs (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William R. Speirs resolved HTTPCORE-308.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.3-alpha1

Patch committed in r1379062
                
> Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic
> --------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-308
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-308
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore, HttpCore NIO
>    Affects Versions: 4.2.1
>            Reporter: William R. Speirs
>             Fix For: 4.3-alpha1
>
>         Attachments: HTTPCORE-308.diff, HTTPCORE-308v2.diff, HTTPCORE-308v3.diff
>
>
> Currently both HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver have a single method lookup which takes a URI to resolve into a HttpRequestHandler/HttpAsyncRequestHandler. These two interfaces could be made more generic by accepting an HttpRequest instead so that routing can be performed based upon other parts of the request like the Host header.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCORE-308) Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433604#comment-13433604 ] 

Oleg Kalnichevski commented on HTTPCORE-308:
--------------------------------------------

Patch looks good to me. I guess we should also provide a basic implementation of the HttpRequestHandlerMapper that resolves handlers based on the request URI. Similar changes should be made to the async HTTP service as well.  

Oleg
                
> Make HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver more generic
> --------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-308
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-308
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore, HttpCore NIO
>    Affects Versions: 4.2.1
>            Reporter: William R. Speirs
>         Attachments: HTTPCORE-308.diff, HTTPCORE-308v2.diff
>
>
> Currently both HttpRequestHandlerResolver and HttpAsyncRequestHandlerResolver have a single method lookup which takes a URI to resolve into a HttpRequestHandler/HttpAsyncRequestHandler. These two interfaces could be made more generic by accepting an HttpRequest instead so that routing can be performed based upon other parts of the request like the Host header.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org