org.jacorb.poa

Class RequestQueue

public class RequestQueue extends Object implements Configurable

This class manages a queue of ServerRequest objects.

Version: $Id: RequestQueue.java,v 1.20 2006/07/19 15:26:39 alphonse.bendt Exp $

Author: Reimo Tiedemann, FU Berlin

Constructor Summary
protected RequestQueue(RequestController controller)
Method Summary
protected voidadd(ServerRequest request)
Adds a request to this queue.
protected voidaddRequestQueueListener(RequestQueueListener listener)
voidconfigure(Configuration myConfiguration)
protected StringPair[]deliverContent()
protected ServerRequestgetElementAndRemove(int rid)
protected ServerRequestgetFirst()
protected booleanisEmpty()
protected ServerRequestremoveFirst()
protected ServerRequestremoveLast()
protected voidremoveRequestQueueListener(RequestQueueListener listener)
protected intsize()

Constructor Detail

RequestQueue

protected RequestQueue(RequestController controller)

Method Detail

add

protected void add(ServerRequest request)
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.

addRequestQueueListener

protected void addRequestQueueListener(RequestQueueListener listener)

configure

public void configure(Configuration myConfiguration)

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