You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/02/27 02:35:00 UTC
[jira] [Commented] (HTTPCORE-515) Add convenience API
org.apache.http.impl.nio.DefaultHttpServerIODispatch.create(T, SSLContext,
ConnectionConfig, HttpRequestFactory)
[ https://issues.apache.org/jira/browse/HTTPCORE-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16377914#comment-16377914 ]
ASF subversion and git services commented on HTTPCORE-515:
----------------------------------------------------------
Commit e94dbabca625ebde6a080761b8de3b0b9880768c in httpcomponents-core's branch refs/heads/4.4.x from [~garydgregory]
[ https://git-wip-us.apache.org/repos/asf?p=httpcomponents-core.git;h=e94dbab ]
[HTTPCORE-515] Add convenience API
org.apache.http.impl.nio.DefaultHttpServerIODispatch.create(T,
SSLContext, ConnectionConfig, HttpRequestFactory).
> Add convenience API org.apache.http.impl.nio.DefaultHttpServerIODispatch.create(T, SSLContext, ConnectionConfig, HttpRequestFactory)
> ------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HTTPCORE-515
> URL: https://issues.apache.org/jira/browse/HTTPCORE-515
> Project: HttpComponents HttpCore
> Issue Type: Improvement
> Components: HttpCore NIO
> Reporter: Gary Gregory
> Assignee: Gary Gregory
> Priority: Major
> Fix For: 4.4.10
>
>
> Add convenience API {{org.apache.http.impl.nio.DefaultHttpServerIODispatch.create(T, SSLContext, ConnectionConfig, HttpRequestFactory)}}:
> {code:java}
> /**
> * Creates a new instance of this class to be used for dispatching I/O event
> * notifications to the given protocol handler.
> *
> * @param eventHandler the server protocol handler.
> * @param sslContext an SSLContext or null (for a plain text connection.)
> * @param config a connection configuration
> * @param httpRequestFactory the request factory used by this object to generate {@link HttpRequest} instances.
> * @return a new instance
> * @since 4.4.10
> */
> public static <T extends NHttpServerEventHandler> DefaultHttpServerIODispatch<T> create(final T eventHandler,
> final SSLContext sslContext, final ConnectionConfig config, HttpRequestFactory httpRequestFactory) {
> final NHttpMessageParserFactory<HttpRequest> httpRequestParserFactory = new DefaultHttpRequestParserFactory(
> null, httpRequestFactory);
> // @formatter:off
> return sslContext == null
> ? new DefaultHttpServerIODispatch<T>(eventHandler,
> new DefaultNHttpServerConnectionFactory(null, httpRequestParserFactory, null, config))
> : new DefaultHttpServerIODispatch<T>(eventHandler,
> new SSLNHttpServerConnectionFactory(sslContext, null, httpRequestParserFactory, null, config));
> // @formatter:om
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org