Package com.openfin.desktop.net
Class WebSocketConnection
java.lang.Object
com.openfin.desktop.net.WebSocketConnection
@WebSocket(maxTextMessageSize=65536)
public class WebSocketConnection
extends java.lang.Object
A WebSocket connection to OpenFin Runtime
Created by wche on 9/21/2016.
-
Constructor Summary
Constructors Constructor Description WebSocketConnection(java.net.URI url)
-
Method Summary
Modifier and Type Method Description void
close()
void
close(java.lang.String reason)
void
connect()
WebSocketEventHandler
getEventHandler()
boolean
isConnected()
void
onClose(int statusCode, java.lang.String reason)
void
onConnect(org.eclipse.jetty.websocket.api.Session session)
void
onError(java.lang.Throwable cause)
void
onMessage(java.lang.String msg)
void
send(java.lang.String data)
void
setEventHandler(WebSocketEventHandler eventHandler)
void
setMaxMessageSize(int size)
-
Constructor Details
-
Method Details
-
setEventHandler
-
getEventHandler
-
isConnected
public boolean isConnected() -
connect
- Throws:
WebSocketException
-
send
- Throws:
WebSocketException
-
close
- Throws:
WebSocketException
-
close
- Throws:
WebSocketException
-
onClose
@OnWebSocketClose public void onClose(int statusCode, java.lang.String reason) -
onConnect
@OnWebSocketConnect public void onConnect(org.eclipse.jetty.websocket.api.Session session) -
onMessage
@OnWebSocketMessage public void onMessage(java.lang.String msg) -
onError
@OnWebSocketError public void onError(java.lang.Throwable cause) -
setMaxMessageSize
public void setMaxMessageSize(int size)
-