java - Jetty WebSocket api vs the standard JSR 356 API -


jetty 9 supports both it's own jetty websocket api standard jsr 356 api, assume historical reasons (jetty's api precedes final jsr 356).

i've looked on basic documentation of both apis, examples. both apis seem complete , rather similar. however, need choose 1 on other new project i'm writing, , i'd avoid using api might deprecated in future or might turn out less feature-rich.

so there important differences between 2 except obvious fact 1 standardized?

implementor of both on jetty here :)

the jetty websocket api came first, , jsr-356 api built on top of it.

the jsr-356 api few things jetty websocket api not, such as

  • decoder's automatic bin/text object conversion
  • encoder's automatic object bin/text conversion
  • path param handling (aka automatic uri template method param mapping)

however, jetty websocket api can things jsr-356 api cannot.

  • websocketcreator logic arbitrary creation of websocket endpoint, access httpservletrequest
  • better control of timeouts
  • finer buffer / memory configurations
  • you can manage websocket extensions
  • supports reg-ex based path mappings endpoints
  • access raw frame events
  • websocket client supports better connect logic timeouts
  • websocket client supports ssl (jsr-356 standalone client has no configuration options this)
  • access both inetaddress endpoint information active websocket session object
  • access upgraderequest active websocket session object
  • better support stateless endpoints
  • read events support suspend/resume logic allow application basic tcp backpressure / flow control
  • filter based or servlet based configuration (the jsr-356 approach requires upgrade occur before other servlet , filter processing)

hope helps, if want more details, please use jetty-users mailing list, sort of question inappropriate stackoverflow.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -