public class UndertowHttpServerConnector extends Object implements org.nustaq.kontraktor.remoting.base.ActorServerConnector, io.undertow.server.HttpHandler
| Modifier and Type | Field and Description |
|---|---|
static int |
REQUEST_RESULTING_FUTURE_TIMEOUT |
static long |
SESSION_TIMEOUT_MS |
| Constructor and Description |
|---|
UndertowHttpServerConnector(org.nustaq.kontraktor.Actor facade) |
| Modifier and Type | Method and Description |
|---|---|
org.nustaq.kontraktor.IPromise |
closeServer() |
protected HttpObjectSocket |
closeSession(String sessionId) |
void |
connect(org.nustaq.kontraktor.Actor facade,
Function<org.nustaq.kontraktor.remoting.base.ObjectSocket,org.nustaq.kontraktor.remoting.base.ObjectSink> factory) |
protected org.nustaq.kontraktor.util.Pair<Runnable,io.undertow.server.HttpServerExchange> |
createLongPollTask(io.undertow.server.HttpServerExchange exchange,
HttpObjectSocket httpObjectSocket,
org.xnio.channels.StreamSinkChannel sinkchannel) |
org.nustaq.kontraktor.remoting.base.ActorServer |
getActorServer() |
long |
getSessionTimeout() |
void |
handleClientRequest(io.undertow.server.HttpServerExchange exchange,
HttpObjectSocket httpObjectSocket,
byte[] postData,
String lastSeenSequence) |
protected void |
handleRegularRequest(io.undertow.server.HttpServerExchange exchange,
HttpObjectSocket httpObjectSocket,
Object[] received,
org.xnio.channels.StreamSinkChannel sinkchannel) |
void |
handleRequest(io.undertow.server.HttpServerExchange exchange)
if relpath is empty, this is considered as a connect/open and a session id is sent back.
|
void |
houseKeeping() |
protected void |
replyFromHistory(io.undertow.server.HttpServerExchange exchange,
org.xnio.channels.StreamSinkChannel sinkchannel,
byte[] msg) |
protected void |
requestReceived(io.undertow.server.HttpServerExchange exchange,
byte[] postData,
String path) |
void |
setActorServer(org.nustaq.kontraktor.remoting.base.ActorServer actorServer) |
void |
setSessionTimeout(long sessionTimeout) |
public static int REQUEST_RESULTING_FUTURE_TIMEOUT
public static long SESSION_TIMEOUT_MS
public UndertowHttpServerConnector(org.nustaq.kontraktor.Actor facade)
public void houseKeeping()
public void setSessionTimeout(long sessionTimeout)
public long getSessionTimeout()
public void handleRequest(io.undertow.server.HttpServerExchange exchange)
throws Exception
handleRequest in interface io.undertow.server.HttpHandlerexchange - Exceptionprotected void requestReceived(io.undertow.server.HttpServerExchange exchange,
byte[] postData,
String path)
protected HttpObjectSocket closeSession(String sessionId)
public void handleClientRequest(io.undertow.server.HttpServerExchange exchange,
HttpObjectSocket httpObjectSocket,
byte[] postData,
String lastSeenSequence)
protected org.nustaq.kontraktor.util.Pair<Runnable,io.undertow.server.HttpServerExchange> createLongPollTask(io.undertow.server.HttpServerExchange exchange, HttpObjectSocket httpObjectSocket, org.xnio.channels.StreamSinkChannel sinkchannel)
protected void replyFromHistory(io.undertow.server.HttpServerExchange exchange,
org.xnio.channels.StreamSinkChannel sinkchannel,
byte[] msg)
protected void handleRegularRequest(io.undertow.server.HttpServerExchange exchange,
HttpObjectSocket httpObjectSocket,
Object[] received,
org.xnio.channels.StreamSinkChannel sinkchannel)
public void connect(org.nustaq.kontraktor.Actor facade,
Function<org.nustaq.kontraktor.remoting.base.ObjectSocket,org.nustaq.kontraktor.remoting.base.ObjectSink> factory)
throws Exception
connect in interface org.nustaq.kontraktor.remoting.base.ActorServerConnectorExceptionpublic org.nustaq.kontraktor.IPromise closeServer()
closeServer in interface org.nustaq.kontraktor.remoting.base.ActorServerConnectorpublic void setActorServer(org.nustaq.kontraktor.remoting.base.ActorServer actorServer)
public org.nustaq.kontraktor.remoting.base.ActorServer getActorServer()
Copyright © 2016. All rights reserved.