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 Summary
Fields Modifier and Type Field Description protected org.nustaq.serialization.FSTConfigurationconfprotected booleanisClosedprotected ThrowablelastErrorprotected Listobjectsprotected AtomicIntegersendSequence -
Constructor Summary
Constructors Constructor Description WebObjectSocket() -
Method Summary
Modifier and Type Method Description voidflush()org.nustaq.serialization.FSTConfigurationgetConf()ThrowablegetLastError()protected intgetObjectMaxBatchSize()AtomicIntegergetSendSequence()booleanisClosed()abstract voidsendBinary(byte[] message)voidsetConf(org.nustaq.serialization.FSTConfiguration conf)voidsetLastError(Throwable ex)voidwriteObject(Object toWrite)
-
Field Details
-
objects
-
conf
protected org.nustaq.serialization.FSTConfiguration conf -
lastError
-
sendSequence
-
isClosed
protected volatile boolean isClosed
-
-
Constructor Details
-
WebObjectSocket
public WebObjectSocket()
-
-
Method Details
-
getSendSequence
-
writeObject
- Specified by:
writeObjectin interfaceorg.nustaq.kontraktor.remoting.base.ObjectSocket- Throws:
Exception
-
getObjectMaxBatchSize
protected int getObjectMaxBatchSize() -
sendBinary
public abstract void sendBinary(byte[] message) -
flush
- Specified by:
flushin interfaceorg.nustaq.kontraktor.remoting.base.ObjectSocket- Throws:
Exception
-
setLastError
- Specified by:
setLastErrorin interfaceorg.nustaq.kontraktor.remoting.base.ObjectSocket
-
getLastError
- Specified by:
getLastErrorin interfaceorg.nustaq.kontraktor.remoting.base.ObjectSocket
-
setConf
public void setConf(org.nustaq.serialization.FSTConfiguration conf)- Specified by:
setConfin interfaceorg.nustaq.kontraktor.remoting.base.ObjectSocket
-
getConf
public org.nustaq.serialization.FSTConfiguration getConf()- Specified by:
getConfin interfaceorg.nustaq.kontraktor.remoting.base.ObjectSocket
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceorg.nustaq.kontraktor.remoting.base.ObjectSocket
-