[ 
https://issues.apache.org/jira/browse/HTTPCORE-570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16762652#comment-16762652
 ] 

Gary Gregory commented on HTTPCORE-570:
---------------------------------------

Hi [~olegk],

Thank you for taking the time to review.

What I'd like to do, in this specific case, is plugin custom suppliers to 
{{org.apache.hc.core5.http.protocol.RequestHandlerRegistry.RequestHandlerRegistry(String,
 Supplier<LookupRegistry<T>>)}} without having to write my own 
{{AsyncServerBootstrap}} since my server already uses {{AsyncServerBootstrap}} 
quite nicely. 

While we have 
{{org.apache.hc.core5.http.impl.bootstrap.AsyncServerBootstrap.setUriPatternType(UriPatternType)}}
 which nicely encapsulates our built-in lookups, the bootstrap class does not 
let you plug in your own, and that's what I need.

Perhaps the KISS would be to add a single API to {{AsyncServerBootstrap}} 
called {{setRequestHandlerRegistryLookupSupplier(Supplier<LookupRegistry<T>>)}} 
or more just {{setRequestHandlerRegistryLookup(LookupRegistry<T>)}}?

There is also something wrong with generic types I'm pretty sure. See my email 
on the dev ML.

Thank you,
Gary

> Add getters to AsyncServerBootstrap and refactor create() impl into protected 
> methods
> -------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-570
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-570
>             Project: HttpComponents HttpCore
>          Issue Type: New Feature
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>            Priority: Major
>
> Add getters to {{AsyncServerBootstrap}} and refactor {{create()}} 
> implementation into protected methods.
> Right now, you can subclass {{AsyncServerBootstrap}} to customize a 
> {{create()}} method but you cannot get to instance variables as these are 
> private.
> The goal is to make creating instances of {{HttpAsyncServer}} simpler by 
> adding getters and refactoring create() implementations into protected 
> methods such that subclasses can more simply create custom instances.
> That does not seem controversial to me so I am not sure a feature branch is 
> needed but I'll create one anyway: {{HTTPCORE-570}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to