On Sun, 2018-02-25 at 13:36 -0700, Gary Gregory wrote: > On Sat, Feb 24, 2018 at 8:45 AM, Gary Gregory <garydgreg...@gmail.com > > > ...
> My code now uses this method: > > private DefaultHttpServerIODispatch<ProxyServiceHandler> > createHttpServerIODispatch(final SSLContext sslContext, final > ConnectionConfig serverConnectionConfig) { > NHttpMessageParserFactory<HttpRequest> > httpRequestParserFactory = > new DefaultHttpRequestParserFactory(null, > CompleteHttpRequestFactory.INSTANCE); > // @formatter:off > return sslContext == null > ? new DefaultHttpServerIODispatch<>(serviceHandler, > new DefaultNHttpServerConnectionFactory(null, > httpRequestParserFactory, null, serverConnectionConfig)) > : new DefaultHttpServerIODispatch<>(serviceHandler, > new > SSLNHttpServerConnectionFactory(sslContext, > null, httpRequestParserFactory, null, serverConnectionConfig)); > // @formatter:om > } > > where CompleteHttpRequestFactory is a custom class. > > This is done instead of calling > DefaultHttpServerIODispatch.create(serviceHandler, > serverSslContext, serverConnectionConfig) > > Can you see augmenting HC to make this less convoluted? > > Gary > Hi Gary You have already added a number of convenience #create methods. Why do not you add a static #create method that takes HttpRequestFactory as a parameter? Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org