Uploaded image for project: 'Wink'
  1. Wink
  2. WINK-192

Should come up with plan for injection on client side

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.0
    • None
    • Client
    • None

    Description

      I don't know if maybe we should tag this with WINK-166, but the RuntimeContext should get set before invoking the client's request's HandlerContext chain. A handler such as AcceptHeaderHandler can invoke a Provider's isReadable (say wink-json-providers) before the ProvidersRegistry is put on the RuntimeContextTLS during the readEntity/writeEntity on the client.

      Should implement UriInfo and other JAX-RS interfaces to allow the widest range of readers/writers on the client. Otherwise, if a provider is injected with one of the Context interfaces, a NPE will occur for them as well (i.e. wink-json-providers)

      I haven't thought this all the way through but another problem is that HttpHeaders is really intended for use on the server side only. I imagine some of the generic provider logic for entity providers would not work correctly (say a HttpHeaders.getAcceptableMediaTypes() is called during the writeTo() of an entity provider).

      Attachments

        1. WINK-192.patch
          2 kB
          Bryant Luk

        Activity

          People

            Unassigned Unassigned
            bluk Bryant Luk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: