Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-506

Add generics to DefaultHttpClientIODispatch to specify the NHttpClientEventHandler implementation type.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.4.9
    • None
    • None

    Description

      Add generics to DefaultHttpClientIODispatch to specify the NHttpClientEventHandler implementation type.

      Change:

      public class DefaultHttpClientIODispatch
                          extends AbstractIODispatch<DefaultNHttpClientConnection>
      

      to use generics in order to type the handler like this:

      public class DefaultHttpClientIODispatch<H extends NHttpClientEventHandler>
                          extends AbstractIODispatch<DefaultNHttpClientConnection>
      

      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.)

      Attachments

        Issue Links

          Activity

            People

              ggregory Gary D. Gregory
              ggregory Gary D. Gregory
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: