• Post Reply Bookmark Topic Watch Topic
  • New Topic

@OnMessage vs. adding a MessageHandler with WebSockets  RSS feed

 
Christian Wansart
Ranch Hand
Posts: 32
Firefox Browser Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I am trying to figure out when to add a MessageHandler instead of just using @OnMessage method. I thought I'd read something about multithreading but I can't find it again. So far I can't think of any situation where an own implementation of a MessageHandler would make sense. So, those are the two source codes:





So, when would you which version and why?

Thanks!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!