com.sun.jini.jeri.internal.http
Class HttpServerManager

java.lang.Object
  extended by com.sun.jini.jeri.internal.http.HttpServerManager

public class HttpServerManager
extends Object

Class for managing server-side functions shared among multiple connections, such as acknowledgment notification.

Author:
Sun Microsystems, Inc.

Nested Class Summary
private static class HttpServerManager.AckListenerMap
          Map for tracking registered AcknowledgmentSource.Listeners.
 
Field Summary
private  HttpServerManager.AckListenerMap ackListeners
           
private  Object cookieLock
           
private  long nextCookie
           
private static Executor userThreadPool
           
 
Constructor Summary
HttpServerManager(long ackTimeout)
          Creates new HttpServerManager which invalidates transport acknowledgments after the given timeout.
 
Method Summary
(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userThreadPool

private static final Executor userThreadPool

ackListeners

private final HttpServerManager.AckListenerMap ackListeners

cookieLock

private final Object cookieLock

nextCookie

private long nextCookie
Constructor Detail

HttpServerManager

public HttpServerManager(long ackTimeout)
Creates new HttpServerManager which invalidates transport acknowledgments after the given timeout.

Method Detail

newCookie

String newCookie()
Returns unique cookie string.


addAckListener

void addAckListener(String cookie,
                    AcknowledgmentSource.Listener listener)
Registers listener waiting for given cookie.


notifyAckListeners

void notifyAckListeners(String cookie)
Notifies all listeners waiting for given cookie with received == true. Notifications are performed in a separate thread.


doAckNotifications

private static void doAckNotifications(LinkedList list,
                                       boolean recvd)
Notifies list of AcknowledgmentSource.Listeners.



Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.