users@jersey.java.net

[Jersey] Getting host and base URI context from outside of Jersey?

From: Jeremy Johnson <jeremy.johnson_at_imtc.gatech.edu>
Date: Thu, 7 Jun 2012 13:47:44 -0400

I'm designing an application that will use web sockets in conjunction with a web service implemented with Jersey.

Among other things, I'd like to use web sockets to inform the client when a particular web service resource has been updated and would like to use UriBuilder to generate URL's that point to resources. The web socket application will be running in the same process as Jersey, and ideally I'd like to try to access the same contextual information Jersey injects into UriInfo (e.g. host name, base URI).

Is there a way to tap into this information from outside of Jersey? If not, I can always just used shared configuration data. Just curious.

Thanks,
Jeremy