public class HttpObjectSocket extends WebObjectSocket implements org.nustaq.kontraktor.remoting.base.ObjectSink
| Modifier and Type | Field and Description |
|---|---|
static int |
HISTORY_SIZE |
static int |
HTTP_BATCH_SIZE |
static int |
LP_TIMEOUT |
conf, isClosed, lastError, objects, sendSequence| Constructor and Description |
|---|
HttpObjectSocket(String sessionId,
Runnable closeAction) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelLongPoll() |
protected void |
checkThread() |
void |
close() |
void |
flush() |
String |
getConnectionIdentifier() |
int |
getId() |
long |
getLastUse() |
org.nustaq.kontraktor.util.Pair<Runnable,KHttpExchange> |
getLongPollTask() |
long |
getLongPollTaskTime() |
org.nustaq.kontraktor.util.Pair<byte[],Integer> |
getNextQueuedMessage() |
String |
getSessionId() |
org.nustaq.kontraktor.remoting.base.ObjectSink |
getSink() |
void |
receiveObject(org.nustaq.kontraktor.remoting.base.ObjectSink asink,
Object received,
List<org.nustaq.kontraktor.IPromise> createdFutures,
Object securityContext) |
void |
sendBinary(byte[] message) |
void |
setLongPollTask(org.nustaq.kontraktor.util.Pair<Runnable,KHttpExchange> longPollTask) |
void |
setSink(org.nustaq.kontraktor.remoting.base.ObjectSink sink) |
void |
sinkClosed() |
void |
storeLPMessage(int inSequence,
Object msg) |
Object |
takeStoredLPMessage(int seq) |
void |
triggerLongPoll() |
void |
updateTimeStamp() |
void |
writeObject(Object toWrite) |
getConf, getLastError, getObjectMaxBatchSize, getSendSequence, isClosed, setConf, setLastErrorpublic static int LP_TIMEOUT
public static int HISTORY_SIZE
public static int HTTP_BATCH_SIZE
public String getSessionId()
public void updateTimeStamp()
public long getLastUse()
public void sendBinary(byte[] message)
sendBinary in class WebObjectSocketpublic void writeObject(Object toWrite) throws Exception
writeObject in interface org.nustaq.kontraktor.remoting.base.ObjectSocketwriteObject in class WebObjectSocketExceptionpublic void close()
throws IOException
close in interface org.nustaq.kontraktor.remoting.base.ObjectSocketIOExceptionpublic int getId()
getId in interface org.nustaq.kontraktor.remoting.base.ObjectSocketpublic String getConnectionIdentifier()
getConnectionIdentifier in interface org.nustaq.kontraktor.remoting.base.ObjectSocketpublic void setSink(org.nustaq.kontraktor.remoting.base.ObjectSink sink)
public org.nustaq.kontraktor.remoting.base.ObjectSink getSink()
public org.nustaq.kontraktor.util.Pair<byte[],Integer> getNextQueuedMessage()
protected void checkThread()
public org.nustaq.kontraktor.util.Pair<Runnable,KHttpExchange> getLongPollTask()
public void cancelLongPoll()
public void triggerLongPoll()
public void setLongPollTask(org.nustaq.kontraktor.util.Pair<Runnable,KHttpExchange> longPollTask)
public long getLongPollTaskTime()
public void receiveObject(org.nustaq.kontraktor.remoting.base.ObjectSink asink,
Object received,
List<org.nustaq.kontraktor.IPromise> createdFutures,
Object securityContext)
receiveObject in interface org.nustaq.kontraktor.remoting.base.ObjectSinkpublic void sinkClosed()
sinkClosed in interface org.nustaq.kontraktor.remoting.base.ObjectSinkpublic Object takeStoredLPMessage(int seq)
public void storeLPMessage(int inSequence,
Object msg)
public void flush()
throws Exception
flush in interface org.nustaq.kontraktor.remoting.base.ObjectSocketflush in class WebObjectSocketExceptionCopyright © 2018. All rights reserved.