java - Spring 4 - websocket messaging stomp handler -


i trying tutorial provided spring - messaging-stomp-websocket , working fine

now want extend , add websocket handler intercept channel.

public class websockethandlerspring extends textwebsockethandler {     @override     public void handletextmessage(websocketsession session, textmessage message) {     } } 

this handler websocketconfig class.

@configuration @enablewebsocketmessagebroker public class websocketconfig extends abstractwebsocketmessagebrokerconfigurer {     @override     public void configuremessagebroker(messagebrokerregistry config) {         config.enablesimplebroker("/topic");         config.setapplicationdestinationprefixes("/app");     }      @override     public void registerstompendpoints(stompendpointregistry registry) {         registry.addendpoint("/hello").withsockjs();     }         } 

any how configure websockethandlerspring handler websocketconfig ?

raw websockethandler support comes @enablewebsocket (not @enablewebsocketmessagebroker). need add , implement websocketconfigurer register endpoints. example here.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -