users@jersey.java.net

[Jersey] Injection (_at_Context) of a Request/Response object in conjunction with jersey-simple-server module

From: <justphilmusic_at_googlemail.com>
Date: Thu, 2 Feb 2012 15:12:12 +0000 (GMT)

Hello everybody!

I'm about to run some tests with Jersey running on top of Simple HTTP
Web server. Having already developed a good dozen of Jersey based web
services running on top of Grizzly/Glassfish I know that you can inject
ServletConfig, ServletContext, HttpServletRequest and
HttpServletResponse by using the @Context annotation.

However, Simple HTTP Web server is not a servlet based container.
Rather, it uses proprietary Request/Response objects:

org.simpleframework.http.Response
org.simpleframework.http.Request


So, the question is:
Is there a possibility to inject these proprietary objects into Jersey
resources?

Something like the code below doesn't work.

@GET
@Produces(MediaType.APPLICATION_JSON)
public Response getUser( @Context org.simpleframework.http.Request
simpleRequest ) {

}


Thank you in advance!

Philipp