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/01/11 16:19:03 UTC

[jira] [Commented] (HTTPCORE-506) Add generics to DefaultHttpClientIODispatch to specify the NHttpClientEventHandler implementation type.

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

ASF subversion and git services commented on HTTPCORE-506:
----------------------------------------------------------

Commit 58b05e67e0ba23845c60b1a0fff65a66588b828f 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=58b05e6 ]

[HTTPCORE-506] Add generics to DefaultHttpClientIODispatch to specify
the NHttpClientEventHandler implementation type.

> Add generics to DefaultHttpClientIODispatch to specify the NHttpClientEventHandler implementation type.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-506
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-506
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>             Fix For: 4.4.9
>
>
> Add generics to {{DefaultHttpClientIODispatch}} to specify the {{NHttpClientEventHandler}} implementation type.
> Change:
> {code:java}
> public class DefaultHttpClientIODispatch
>                     extends AbstractIODispatch<DefaultNHttpClientConnection>
> {code}
> to use generics in order to type the handler like this:
> {code:java}
> public class DefaultHttpClientIODispatch<H extends NHttpClientEventHandler>
>                     extends AbstractIODispatch<DefaultNHttpClientConnection>
> {code}
> This allows call sites to call getHandler() and get the exact type that was passed in on construction instead of getting back the interface and going a type-cast (if you need access to the actual class.)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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