org.jacorb.poa
Class RequestQueue

java.lang.Object
  extended byorg.jacorb.poa.RequestQueue

public class RequestQueue
extends java.lang.Object

This class will manage a queue of ServerRequest objects.

Version:
$Id: RequestQueue.java,v 1.15 2004/01/06 14:53:15 nick.cross Exp $
Author:
Reimo Tiedemann, FU Berlin

Constructor Summary
protected RequestQueue(RequestController controller, org.apache.avalon.framework.logger.Logger logger)
           
 
Method Summary
protected  void add(ServerRequest request)
          Adds a request to this queue.
protected  void addRequestQueueListener(RequestQueueListener listener)
           
protected  StringPair[] deliverContent()
           
protected  ServerRequest getElementAndRemove(int rid)
           
protected  ServerRequest getFirst()
           
protected  boolean isEmpty()
           
protected  ServerRequest removeFirst()
           
protected  ServerRequest removeLast()
           
protected  void removeRequestQueueListener(RequestQueueListener listener)
           
protected  int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestQueue

protected RequestQueue(RequestController controller,
                       org.apache.avalon.framework.logger.Logger logger)
Method Detail

add

protected void add(ServerRequest request)
            throws ResourceLimitReachedException
Adds a request to this queue. The properties jacorb.poa.queue_{min,max,wait} specify what happens when the queue is full, i.e. when it already contains queue_max requests. If queue_wait is off, then this method does not add the request and throws a ResourceLimitReachedException. If queue_wait is on, then this method blocks until no more than queue_min requests are in the queue; it then adds the request, and returns.

Throws:
ResourceLimitReachedException

addRequestQueueListener

protected void addRequestQueueListener(RequestQueueListener listener)

deliverContent

protected StringPair[] deliverContent()

getElementAndRemove

protected ServerRequest getElementAndRemove(int rid)

getFirst

protected ServerRequest getFirst()

isEmpty

protected boolean isEmpty()

removeFirst

protected ServerRequest removeFirst()

removeLast

protected ServerRequest removeLast()

removeRequestQueueListener

protected void removeRequestQueueListener(RequestQueueListener listener)

size

protected int size()