title: Spring 4 - websocket messaging stomp handler
body: <p>I was trying the tutorial provided by spring  - <a href="https://spring.io/guides/gs/messaging-stomp-websocket/" rel="nofollow">messaging-stomp-websocket</a> and it is working fine</p>
  
  <p>Now I want to extend the this and add my WebSocket handler which intercept the channel.</p>
  
  <pre><code>public class WebSocketHandlerSpring extends TextWebSocketHandler {
      @Override
      public void handleTextMessage(WebSocketSession session, TextMessage message) {
      }
  }
  </code></pre>
  
  <p>This handler to WebSocketConfig class. </p>
  
  <pre><code>@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();
      }        
  }
  </code></pre>
  
  <p>Any help how to configure <code>WebSocketHandlerSpring</code> handler to <code>WebSocketConfig</code> ?</p>