views:

600

answers:

1

In a custom MessageAdapter written for a BlazeDS Java server, is there any way to access HTTPSession and HTTPRequest in a custom MessageAdapter.

I'm trying to adapt an existing COMET JSON long-poll messaging system to BlazeDS and we use HTTPRequest parameters to specify message sending/polling paramers (such as a unique ContextID for any given page for a user).

Is there any type of HTTPSession information we can retrieve in MessageAdapter receiveMessage()?

If I can't access the HTTPRequest (I'm not sure we can even customize it if we're using the standard Producer, Consumer Actionscript classes anyways), is there a way to uniquely identify a given FlexClient long-poll from another long-poll from that client (e.g. if the same HTTPSession user has a tab open to the same Flex application is there any way to uniquely identify that user?).

+1  A: 

Yeah, you can access the information through the FlexContext object (and a whole lot more besides).

Check the BlazeDS FlexContext JavaDoc

Gregor Kiddie