Hi,

On Wed, Dec 23, 2015 at 2:21 PM, Daniel Stoch <daniel.st...@gmail.com>
wrote:

> Hi,
>
> I am during replacement Atmosphere push implementation to Wicket
> Native WebSockets. I have an abstraction layer over it, so I can
> replace only implementation and easily switch between these two
> solutions and compare them. I have a couple of questions about Native
> WebSockets:
>
> 1. In WebSocketResponse many methods throws
> UnsupportedOperationException. I have a situation when component sets
> cookie during its lifecycle, so this exeption is raised when it is
> refreshed during push response. Is it any chance to implement these
> methods or do they necessary throw exceptions? In Atmosphere
> implementation this works.
>

Although an HTTP request is being *upgraded* to WebSocket, the websocket
response is not an HTTP response.
You can only write String and binary data that is processed by the
application client code. The browser doesn't read/intercept the data
transfered on the websocket connection so any headers (like cookies) could
not be processed.

We could change the impl to log a warning whenever one of those methods is
used instead of throwing exception.
Just like
https://github.com/apache/wicket/commit/8a5508e117991faf43f53d770b64568842d8d557
Please file a ticket if you think this is a better implementation.


>
> 2. I have a code which checks
> PageRequestHandlerTracker.getLastHandler(requestCycle) to get actual
> page for current request (is it a best method?). During processing
> push request this method returns null. Is it a correct behavior? In
> Atmosphere implementation this works too ;).
>

I think this should work.
There must be a bug somewhere.


>
> More questions to come later ;)
> PS. I am using Wicket 6.x.
>
> --
> Best regards,
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to