Class WebSocketPublisher
java.lang.Object
org.nustaq.kontraktor.remoting.http.undertow.WebSocketPublisher
- All Implemented Interfaces:
org.nustaq.kontraktor.remoting.base.ActorPublisher
public class WebSocketPublisher
extends Object
implements org.nustaq.kontraktor.remoting.base.ActorPublisher
Created by ruedi on 04/06/15.
-
Constructor Summary
ConstructorsConstructorDescriptionWebSocketPublisher(org.nustaq.kontraktor.Actor facade, String host, String path, int port) WebSocketPublisher(BldFourK cfgFourK, org.nustaq.kontraktor.Actor facade, String hostName, String urlPath, int port) -
Method Summary
Modifier and TypeMethodDescriptioncoding(org.nustaq.kontraktor.remoting.encoding.Coding coding) facade(org.nustaq.kontraktor.Actor facade) org.nustaq.kontraktor.remoting.base.TrafficMonitorport(int port) org.nustaq.kontraktor.IPromise<org.nustaq.kontraktor.remoting.base.ActorServer>sendSid(boolean sendSid) send sessionid like sid:234-234-234 after a client connects.sendStringMessages(boolean sendStringMessages) node.js does not support full file api, so binary messages cannot be de'jsoned.serType(org.nustaq.kontraktor.remoting.encoding.SerializerType tp) setTrafficMonitor(org.nustaq.kontraktor.remoting.base.TrafficMonitor trafficMonitor) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nustaq.kontraktor.remoting.base.ActorPublisher
publish
-
Constructor Details
-
WebSocketPublisher
public WebSocketPublisher() -
WebSocketPublisher
-
WebSocketPublisher
-
-
Method Details
-
buildWebsocket
-
publish
public org.nustaq.kontraktor.IPromise<org.nustaq.kontraktor.remoting.base.ActorServer> publish(Consumer<org.nustaq.kontraktor.Actor> disconnectCallback) - Specified by:
publishin interfaceorg.nustaq.kontraktor.remoting.base.ActorPublisher
-
hostName
-
urlPath
-
port
-
coding
-
serType
-
facade
- Specified by:
facadein interfaceorg.nustaq.kontraktor.remoting.base.ActorPublisher
-
setTrafficMonitor
public WebSocketPublisher setTrafficMonitor(org.nustaq.kontraktor.remoting.base.TrafficMonitor trafficMonitor) - Specified by:
setTrafficMonitorin interfaceorg.nustaq.kontraktor.remoting.base.ActorPublisher
-
sendStringMessages
node.js does not support full file api, so binary messages cannot be de'jsoned. Add an option to send all data as String via websocket (FIXME: quite some overhead as byte array is UTF-8'ed) default is binary messages (ok for browsers, not node)- Parameters:
sendStringMessages-- Returns:
-
cfg
-
sendSid
send sessionid like sid:234-234-234 after a client connects. WARNING: only javascript-SPA clients currently understand this. ensure false for non-SPA servers. Defaults false -
getTrafficMonitor
public org.nustaq.kontraktor.remoting.base.TrafficMonitor getTrafficMonitor()
-