Class EventBusCollector
- java.lang.Object
-
- org.springframework.web.socket.handler.AbstractWebSocketHandler
-
- org.swisspush.gateleen.player.log.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 Summary
Constructors Constructor Description EventBusCollector(String urlPrefix, String sockPath, String address, com.google.common.base.Predicate<? super Exchange> filter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterConnectionClosed(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus status)voidafterConnectionEstablished(org.springframework.web.socket.WebSocketSession session)BufferingRequestLoggetRequestLog()protected voidhandleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message)voidhandleTransportError(org.springframework.web.socket.WebSocketSession session, Throwable exception)voidstart()voidstop()
-
-
-
Method Detail
-
getRequestLog
public BufferingRequestLog getRequestLog()
- Specified by:
getRequestLogin interfaceCollector
-
handleTextMessage
protected void handleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message) throws Exception- Overrides:
handleTextMessagein classorg.springframework.web.socket.handler.AbstractWebSocketHandler- Throws:
Exception
-
afterConnectionEstablished
public void afterConnectionEstablished(org.springframework.web.socket.WebSocketSession session) throws Exception- Specified by:
afterConnectionEstablishedin interfaceorg.springframework.web.socket.WebSocketHandler- Overrides:
afterConnectionEstablishedin classorg.springframework.web.socket.handler.AbstractWebSocketHandler- Throws:
Exception
-
handleTransportError
public void handleTransportError(org.springframework.web.socket.WebSocketSession session, Throwable exception) throws Exception- Specified by:
handleTransportErrorin interfaceorg.springframework.web.socket.WebSocketHandler- Overrides:
handleTransportErrorin classorg.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:
afterConnectionClosedin interfaceorg.springframework.web.socket.WebSocketHandler- Overrides:
afterConnectionClosedin classorg.springframework.web.socket.handler.AbstractWebSocketHandler- Throws:
Exception
-
-