org.jacorb.poa
Class RequestQueue

java.lang.Object
  extended byorg.jacorb.poa.RequestQueue
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable

public class RequestQueue
extends java.lang.Object
implements org.apache.avalon.framework.configuration.Configurable

This class manages a queue of ServerRequest objects.

Version:
$Id: RequestQueue.java,v 1.18 2004/05/06 12:40:00 nicolas Exp $
Author:
Reimo Tiedemann, FU Berlin

Constructor Summary
protected RequestQueue(RequestController controller)
           
 
Method Summary
protected  void add(ServerRequest request)
          Adds a request to this queue.
protected  void addRequestQueueListener(RequestQueueListener listener)
           
 void configure(org.apache.avalon.framework.configuration.Configuration myConfiguration)
           
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)
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration myConfiguration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

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()