Uploaded image for project: 'Immutant'
  1. Immutant
  2. IMMUTANT-456

Allow custom configurator for websocket endpoint

    Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0.0-alpha1, 2.0.0-beta3
    • Fix Version/s: 2.0.0-alpha1
    • Labels:
      None

      Description

      Sometimes there are needs to access HttpSession and cookies from HandshakeRequest, but the Java websocket API doesn't provide methods to do so.

      A workaround is put HttpSession and cookies from HandshakeRequest to UserProperties before onOpen, and then javax.websocket.Session.getUserProperties.get(...) can be used to retrieve the HttpSession put in earlier. This require a custom configurator, immutant.websocket/create-servlet doesn't seem to allow custom configurator at the moment. It will be good if immutant's websocket API can take in custom configurator.

      The link below to StackOverflow provides more info:

      http://stackoverflow.com/questions/17936440/accessing-httpsession-from-httpservletrequest-in-a-web-socket-socketendpoint

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jcrossley Jim Crossley
                Reporter:
                qfz Feng Zhou
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: