Class EventBusCollector

  • All Implemented Interfaces:
    org.springframework.web.socket.WebSocketHandler, Collector

    public class EventBusCollector
    extends org.springframework.web.socket.handler.AbstractWebSocketHandler
    implements Collector
    Collects a request log live from a vert.x eventbus exposed with SockJS.
    Author:
    https://github.com/lbovet [Laurent Bovet]
    • Constructor Detail

      • EventBusCollector

        public EventBusCollector​(String urlPrefix,
                                 String sockPath,
                                 String address,
                                 com.google.common.base.Predicate<? super Exchange> filter)
    • Method Detail

      • start

        public void start()
        Specified by:
        start in interface Collector
      • stop

        public void stop()
        Specified by:
        stop in interface Collector
      • handleTextMessage

        protected void handleTextMessage​(org.springframework.web.socket.WebSocketSession session,
                                         org.springframework.web.socket.TextMessage message)
                                  throws Exception
        Overrides:
        handleTextMessage in class org.springframework.web.socket.handler.AbstractWebSocketHandler
        Throws:
        Exception
      • afterConnectionEstablished

        public void afterConnectionEstablished​(org.springframework.web.socket.WebSocketSession session)
                                        throws Exception
        Specified by:
        afterConnectionEstablished in interface org.springframework.web.socket.WebSocketHandler
        Overrides:
        afterConnectionEstablished in class org.springframework.web.socket.handler.AbstractWebSocketHandler
        Throws:
        Exception
      • handleTransportError

        public void handleTransportError​(org.springframework.web.socket.WebSocketSession session,
                                         Throwable exception)
                                  throws Exception
        Specified by:
        handleTransportError in interface org.springframework.web.socket.WebSocketHandler
        Overrides:
        handleTransportError in class org.springframework.web.socket.handler.AbstractWebSocketHandler
        Throws:
        Exception
      • afterConnectionClosed

        public void afterConnectionClosed​(org.springframework.web.socket.WebSocketSession session,
                                          org.springframework.web.socket.CloseStatus status)
                                   throws Exception
        Specified by:
        afterConnectionClosed in interface org.springframework.web.socket.WebSocketHandler
        Overrides:
        afterConnectionClosed in class org.springframework.web.socket.handler.AbstractWebSocketHandler
        Throws:
        Exception