public class HttpServerManager extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
HttpServerManager.AckListenerMap
Map for tracking registered AcknowledgmentSource.Listeners.
|
Modifier and Type | Field and Description |
---|---|
private HttpServerManager.AckListenerMap |
ackListeners |
private Object |
cookieLock |
private long |
nextCookie |
private static Executor |
userThreadPool |
Constructor and Description |
---|
HttpServerManager(long ackTimeout)
Creates new HttpServerManager which invalidates transport
acknowledgments after the given timeout.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addAckListener(String cookie,
AcknowledgmentSource.Listener listener)
Registers listener waiting for given cookie.
|
private static void |
doAckNotifications(LinkedList list,
boolean recvd)
Notifies list of AcknowledgmentSource.Listeners.
|
(package private) String |
newCookie()
Returns unique cookie string.
|
(package private) void |
notifyAckListeners(String cookie)
Notifies all listeners waiting for given cookie with received == true.
|
private static final Executor userThreadPool
private final HttpServerManager.AckListenerMap ackListeners
private final Object cookieLock
private long nextCookie
public HttpServerManager(long ackTimeout)
String newCookie()
void addAckListener(String cookie, AcknowledgmentSource.Listener listener)
void notifyAckListeners(String cookie)
private static void doAckNotifications(LinkedList list, boolean recvd)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.