Class ValuationHandler
java.lang.Object
net.finmath.smartcontract.valuation.service.websocket.handler.ValuationHandler
- All Implemented Interfaces:
org.springframework.web.socket.WebSocketHandler
public class ValuationHandler
extends Object
implements org.springframework.web.socket.WebSocketHandler
Simple ValuationHandler based on a live market data feed for a Websocket-Connection
Firste: As inbound message an xml will trigger a connect to market data adapter Second: A valuation observable will connect on the continous market data feed Third: A consumer subscribes to the valuation observable and sending test messages over the websocket connection - For Demo Purposes may also implement for RandomMarketDataFeed - marketDataWebSocketAdapter should be a single instance shared across several handlers - parse subscription settings out of product XML (i.e. settlement frequency) - Add other handlers
- Author:
- Peter Kohl-Landgraf
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterConnectionClosed
(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus status) void
afterConnectionEstablished
(org.springframework.web.socket.WebSocketSession session) void
handleMessage
(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.WebSocketMessage<?> message) void
handleTransportError
(org.springframework.web.socket.WebSocketSession session, Throwable exception) boolean
-
Constructor Details
-
ValuationHandler
public ValuationHandler()
-
-
Method Details
-
handleMessage
-
handleTransportError
-
supportsPartialMessages
public boolean supportsPartialMessages()- Specified by:
supportsPartialMessages
in interfaceorg.springframework.web.socket.WebSocketHandler
-
afterConnectionEstablished
-
afterConnectionClosed
-