Class WebObjectSocket

java.lang.Object
org.nustaq.kontraktor.remoting.websockets.WebObjectSocket
All Implemented Interfaces:
org.nustaq.kontraktor.remoting.base.ObjectSocket
Direct Known Subclasses:
HttpObjectSocket, JSR356ClientConnector.WSClientEndpoint, UndertowWebsocketServerConnector.UTWebObjectSocket

public abstract class WebObjectSocket
extends Object
implements org.nustaq.kontraktor.remoting.base.ObjectSocket
Created by ruedi on 11/05/15. implements batching on a message-object level. This results in nice speed up and protocol compression, as serializing a batch of messages automatically strips double objects+strings.
  • Field Details

  • Constructor Details

  • Method Details

    • getSendSequence

      public AtomicInteger getSendSequence()
    • writeObject

      public void writeObject​(Object toWrite) throws Exception
      Specified by:
      writeObject in interface org.nustaq.kontraktor.remoting.base.ObjectSocket
      Throws:
      Exception
    • getObjectMaxBatchSize

      protected int getObjectMaxBatchSize()
    • sendBinary

      public abstract void sendBinary​(byte[] message)
    • flush

      public void flush() throws Exception
      Specified by:
      flush in interface org.nustaq.kontraktor.remoting.base.ObjectSocket
      Throws:
      Exception
    • setLastError

      public void setLastError​(Throwable ex)
      Specified by:
      setLastError in interface org.nustaq.kontraktor.remoting.base.ObjectSocket
    • getLastError

      public Throwable getLastError()
      Specified by:
      getLastError in interface org.nustaq.kontraktor.remoting.base.ObjectSocket
    • setConf

      public void setConf​(org.nustaq.serialization.FSTConfiguration conf)
      Specified by:
      setConf in interface org.nustaq.kontraktor.remoting.base.ObjectSocket
    • getConf

      public org.nustaq.serialization.FSTConfiguration getConf()
      Specified by:
      getConf in interface org.nustaq.kontraktor.remoting.base.ObjectSocket
    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in interface org.nustaq.kontraktor.remoting.base.ObjectSocket