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

New I/O: Add named pipe support

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 6
    • core-libs
    • x86
    • windows_xp

      A DESCRIPTION OF THE REQUEST :
      There shall be a explicit, transparent, non-operating-system-dependent API for creating, using, and destroying named pipes.

      JUSTIFICATION :
      Using named pipes is a common paradigma in modern software development. It allows inter-process communication in a streaming way, without the need for potentially slow physical file access.

      Java can support named pipes on several operating systems if the file name is matching the host operating system's naming syntax for named pipes. As a result, the application will only run on that exact operating system.

        To fulfil the Write Once Run Anywhere paradigma there should be an API that allows to explicitly issue the creation of a named pipe without knowing the particular naming syntax, just as the current file API allows to create temporary files without knowing anything about the operating system's way to deal with temporary files.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The new API will allow to use a named pipe like a file. The only difference should be that at creation the programmer has to issue that the new object will be a named pipe instead of a physical file, similar to creating temporary files.

      Since most applications will use named pipes only temporary, it might be beneficial to allow using of deleteOnExit with named pipes, known from the existing temporary files API.
      ACTUAL -
      Can created or open named pipes only when using the local operating system's naming syntax. No platform independent support.

      ---------- BEGIN SOURCE ----------
      Since no such API does exist, no real example can be provided. The following shall be a pseudo-code example of what we are targetting. The assumed API is similar to the already existing temporary files API:

      File p = File.createNamedPipe("SamplePipeName", "SamplePipeDirectory");
      p.deleteOnExit();
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Must use platform dependent naming syntax for named pipes.
      Must accept that resulting applicating will be platform dependent (Write Once Run SOMEWHERE)

            bpb Brian Burkhalter
            ryeung Roger Yeung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: