[
https://issues.apache.org/jira/browse/HTTPCORE-506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary Gregory updated HTTPCORE-506:
----------------------------------
Description:
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.)
was:
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.)
> 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
>
> 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: [email protected]
For additional commands, e-mail: [email protected]