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