Class WebSocketConnector
java.lang.Object
net.finmath.smartcontract.valuation.marketdata.generators.WebSocketConnector
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.json.JSONObject
getAuthenticationInfo
(org.json.JSONObject previousAuthResponseJson, String url) Authenticate to Refinitiv Data Platform via an HTTP post request.org.json.JSONObject
com.neovisionaries.ws.client.WebSocket
com.neovisionaries.ws.client.WebSocket
Connect to the Realtime Service over a WebSocket.
-
Field Details
-
authJson
public org.json.JSONObject authJson -
position
-
scope
-
server
-
ws
public static com.neovisionaries.ws.client.WebSocket ws
-
-
Constructor Details
-
WebSocketConnector
- Throws:
Exception
-
-
Method Details
-
getWebSocket
-
getAuthJson
public org.json.JSONObject getAuthJson() -
getPosition
-
initAuthJson
-
initWebSocketConnection
public com.neovisionaries.ws.client.WebSocket initWebSocketConnection() throws IOException, com.neovisionaries.ws.client.WebSocketException, NoSuchAlgorithmExceptionConnect to the Realtime Service over a WebSocket.- Throws:
IOException
com.neovisionaries.ws.client.WebSocketException
NoSuchAlgorithmException
-
getAuthenticationInfo
public org.json.JSONObject getAuthenticationInfo(org.json.JSONObject previousAuthResponseJson, String url) Authenticate to Refinitiv Data Platform via an HTTP post request. Initially authenticates using the specified password. If information from a previous authentication response is provided, it instead authenticates using the refresh token from that response.- Parameters:
previousAuthResponseJson
- Information from a previous authentication, if availableurl
- The HTTP post url- Returns:
- A JSONObject containing the authentication information from the response.
-