Class WebsocketWebsocketFactory.WebSocketImpl
java.lang.Object
de.oktoflow.platform.support.ws.websocket.WebsocketWebsocketFactory.WebSocketImpl
- All Implemented Interfaces:
de.iip_ecosphere.platform.support.websocket.WebsocketFactory.WebSocket
- Enclosing class:
WebsocketWebsocketFactory
private static class WebsocketWebsocketFactory.WebSocketImpl
extends Object
implements de.iip_ecosphere.platform.support.websocket.WebsocketFactory.WebSocket
Implements the actual web socket. Indirection required as the WebSocketClient conflicts in exception types.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidvoidconnect()booleangetURI()booleanisClosed()booleanisOpen()voidvoidsetReceptionHander(Consumer<String> receptionHandler) voidsetStatusListener(de.iip_ecosphere.platform.support.websocket.WebsocketFactory.StatusListener listener)
-
Field Details
-
client
-
-
Constructor Details
-
WebSocketImpl
Creates a web socket for the given server URI.- Parameters:
serverUri- the server URI
-
-
Method Details
-
connect
- Specified by:
connectin interfacede.iip_ecosphere.platform.support.websocket.WebsocketFactory.WebSocket- Throws:
IOException
-
connectBlocking
- Specified by:
connectBlockingin interfacede.iip_ecosphere.platform.support.websocket.WebsocketFactory.WebSocket- Throws:
IOException
-
close
- Specified by:
closein interfacede.iip_ecosphere.platform.support.websocket.WebsocketFactory.WebSocket- Throws:
IOException
-
setReceptionHander
- Specified by:
setReceptionHanderin interfacede.iip_ecosphere.platform.support.websocket.WebsocketFactory.WebSocket
-
setStatusListener
public void setStatusListener(de.iip_ecosphere.platform.support.websocket.WebsocketFactory.StatusListener listener) - Specified by:
setStatusListenerin interfacede.iip_ecosphere.platform.support.websocket.WebsocketFactory.WebSocket
-
send
- Specified by:
sendin interfacede.iip_ecosphere.platform.support.websocket.WebsocketFactory.WebSocket- Throws:
IOException
-
closeBocking
- Specified by:
closeBockingin interfacede.iip_ecosphere.platform.support.websocket.WebsocketFactory.WebSocket- Throws:
IOException
-
getURI
- Specified by:
getURIin interfacede.iip_ecosphere.platform.support.websocket.WebsocketFactory.WebSocket
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfacede.iip_ecosphere.platform.support.websocket.WebsocketFactory.WebSocket
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfacede.iip_ecosphere.platform.support.websocket.WebsocketFactory.WebSocket
-