Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6331719

(se) Application should be able to extend default selector provider

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 1.4.1, 5.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      generic, windows_xp

      Description

      The way the current java.nio.channels.spi.SelectorProvider implemented doesnt allow any application to extend the default selector provider functionality offered by JDK.
      The currrent method of setting system propoerty java.nio.channels.spi.SelectorProvider forces user to implement all nio socket functionality on their own.

      The only way to get the default provider object is by calling SelectorProvider.provider(). However this call sets a singleton to be used as SelectorProvider. So, the very first time the SelectorProvider.provider() is called, the provider singleton object is set. This would disallow wrapping the provider in a custom class.

      There is no system property that user can access to obtain the default selector provider class name of JDK. So, application cannot use reflection to create the provider and then wrap in its on custom implementation.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alanb Alan Bateman
                Reporter:
                bpg Binod Pankajakshy Gangadharan (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: