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
Constructors Constructor Description WebSocketPublisher()WebSocketPublisher(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 Type Method Description BldFourKbuildWebsocket()WebSocketPublishercfg(BldFourK cfg)WebSocketPublishercoding(org.nustaq.kontraktor.remoting.encoding.Coding coding)WebSocketPublisherfacade(org.nustaq.kontraktor.Actor facade)org.nustaq.kontraktor.remoting.base.TrafficMonitorgetTrafficMonitor()WebSocketPublisherhostName(String hostName)WebSocketPublisherport(int port)org.nustaq.kontraktor.IPromise<org.nustaq.kontraktor.remoting.base.ActorServer>publish(Consumer<org.nustaq.kontraktor.Actor> disconnectCallback)WebSocketPublishersendSid(boolean sendSid)send sessionid like sid:234-234-234 after a client connects.WebSocketPublishersendStringMessages(boolean sendStringMessages)node.js does not support full file api, so binary messages cannot be de'jsoned.WebSocketPublisherserType(org.nustaq.kontraktor.remoting.encoding.SerializerType tp)WebSocketPublishersetTrafficMonitor(org.nustaq.kontraktor.remoting.base.TrafficMonitor trafficMonitor)WebSocketPublisherurlPath(String urlPath)
-
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()
-