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 Details

    • WebSocketPublisher

      public WebSocketPublisher()
    • WebSocketPublisher

      public WebSocketPublisher(org.nustaq.kontraktor.Actor facade, String host, String path, int port)
    • WebSocketPublisher

      public WebSocketPublisher(BldFourK cfgFourK, org.nustaq.kontraktor.Actor facade, String hostName, String urlPath, int port)
  • Method Details

    • buildWebsocket

      public BldFourK buildWebsocket()
    • publish

      public org.nustaq.kontraktor.IPromise<org.nustaq.kontraktor.remoting.base.ActorServer> publish(Consumer<org.nustaq.kontraktor.Actor> disconnectCallback)
      Specified by:
      publish in interface org.nustaq.kontraktor.remoting.base.ActorPublisher
    • hostName

      public WebSocketPublisher hostName(String hostName)
    • urlPath

      public WebSocketPublisher urlPath(String urlPath)
    • port

      public WebSocketPublisher port(int port)
    • coding

      public WebSocketPublisher coding(org.nustaq.kontraktor.remoting.encoding.Coding coding)
    • serType

      public WebSocketPublisher serType(org.nustaq.kontraktor.remoting.encoding.SerializerType tp)
    • facade

      public WebSocketPublisher facade(org.nustaq.kontraktor.Actor facade)
      Specified by:
      facade in interface org.nustaq.kontraktor.remoting.base.ActorPublisher
    • setTrafficMonitor

      public WebSocketPublisher setTrafficMonitor(org.nustaq.kontraktor.remoting.base.TrafficMonitor trafficMonitor)
      Specified by:
      setTrafficMonitor in interface org.nustaq.kontraktor.remoting.base.ActorPublisher
    • sendStringMessages

      public WebSocketPublisher sendStringMessages(boolean 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

      public WebSocketPublisher cfg(BldFourK cfg)
    • sendSid

      public WebSocketPublisher sendSid(boolean 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()