Hi Peter,

I don't see a problem to make all msgs serializable.
Please create a ticket!
With a Pull Request/Patch would be awesome!
Thank you!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sat, Nov 19, 2016 at 3:46 PM, Peter Henderson <
peter.hender...@starjar.com> wrote:

> Hi all.
>
> Wicket 7.3.0
> Native web sockets.
> Tomcat 8.5.5
>
> I am trying to do background processing with results being pushed to a
> client as they become available.
>
> I store the connected message when a web socket connection is made [1].
> This is used to fire push data to a single client/page [2]
>
> A little bit of googling I find [3].
> Am I incorrectly using the api?
> The ConnectedMessage is not serializable [4]
>
>
>
> Thanks
>
> Peter.
>
>
>
>
> [1]
> private var connected: ConnectedMessage = _
>
> add(new WebSocketBehavior {
>   override def onConnect(message: ConnectedMessage): Unit = {
>     super.onConnect(message)
>     println("web socket connected.")
>     connected = message
>   }
> })
>
>
>
> [2]
> private def broadcast(msg: IWebSocketPushMessage): Unit = {
>   val application = WicketStarjarApplication.get()
>   val webSocketSettings = WebSocketSettings.Holder.get(application)
>   val broadcaster = new
> WebSocketPushBroadcaster(webSocketSettings.getConnectionRegistry())
>   broadcaster.broadcast(connected, msg)
> }
>
>
> [3]
> http://apache-wicket.1842946.n4.nabble.com/WebSockets-IKey-
> not-Serializable-td4666996.html
> https://issues.apache.org/jira/browse/WICKET-5670
>
>
> [4]
> org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream$
> ObjectCheckException:
> The object type is not Serializable!
> A problem occurred while checking object with type:
> org.apache.wicket.protocol.ws.api.message.ConnectedMessage
>
>
>
>
>
>
> --
> Peter Henderson
>

Reply via email to