websocket-spec
  1. websocket-spec
  2. WEBSOCKET_SPEC-32

SendHandler: Consider using JDK 7 CompletionHandler instead

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      http://docs.oracle.com/javase/7/docs/api/java/nio/channels/CompletionHandler.html

      One counter argument is that we'd like only to use SAM types in the API so that it is easy to write lambdas when we can rely in JDK 8. Will check into whether there are plans for this JDK interface to evolve to be 'lambda-ready'.

        Activity

        Hide
        dannycoward added a comment -

        We concluded this this would make the API more difficult to use, and we prefer our single method abstract SendHandler type because we think it will be, in addition to the typing information which is useful, easier to write as a Java lambda experssion in the future.

        Show
        dannycoward added a comment - We concluded this this would make the API more difficult to use, and we prefer our single method abstract SendHandler type because we think it will be, in addition to the typing information which is useful, easier to write as a Java lambda experssion in the future.

          People

          • Assignee:
            dannycoward
            Reporter:
            dannycoward
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved: