org.jacorb.notification.queue
Class RWLockEventQueueDecorator

java.lang.Object
  extended byorg.jacorb.notification.queue.RWLockEventQueueDecorator
All Implemented Interfaces:
MessageQueueAdapter

public class RWLockEventQueueDecorator
extends java.lang.Object
implements MessageQueueAdapter

Version:
$Id: RWLockEventQueueDecorator.java,v 1.8 2006/03/03 19:54:48 alphonse.bendt Exp $
Author:
Alphonse Bendt

Constructor Summary
RWLockEventQueueDecorator(MessageQueueAdapter initialDelegate)
           
 
Method Summary
 void addDiscardListener(MessageQueue.DiscardListener listener)
           
 void clear()
           
 void enqeue(Message message)
           
 Message[] getAllMessages()
           
 Message[] getAtLeastMessages(int min)
           
 java.lang.String getDiscardPolicyName()
           
 Message getMessageBlocking()
           
 Message getMessageNoBlock()
           
 java.lang.String getOrderPolicyName()
           
 int getPendingMessagesCount()
           
 Message[] getUpToMessages(int max)
           
 boolean hasPendingMessages()
           
 void removeDiscardListener(MessageQueue.DiscardListener listener)
           
 void replaceDelegate(MessageQueueAdapter newDelegate)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RWLockEventQueueDecorator

public RWLockEventQueueDecorator(MessageQueueAdapter initialDelegate)
Method Detail

replaceDelegate

public void replaceDelegate(MessageQueueAdapter newDelegate)
                     throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

enqeue

public void enqeue(Message message)
            throws java.lang.InterruptedException
Specified by:
enqeue in interface MessageQueueAdapter
Throws:
java.lang.InterruptedException

hasPendingMessages

public boolean hasPendingMessages()
                           throws java.lang.InterruptedException
Specified by:
hasPendingMessages in interface MessageQueueAdapter
Throws:
java.lang.InterruptedException

getPendingMessagesCount

public int getPendingMessagesCount()
                            throws java.lang.InterruptedException
Specified by:
getPendingMessagesCount in interface MessageQueueAdapter
Throws:
java.lang.InterruptedException

getMessageBlocking

public Message getMessageBlocking()
                           throws java.lang.InterruptedException
Specified by:
getMessageBlocking in interface MessageQueueAdapter
Throws:
java.lang.InterruptedException

getMessageNoBlock

public Message getMessageNoBlock()
                          throws java.lang.InterruptedException
Specified by:
getMessageNoBlock in interface MessageQueueAdapter
Throws:
java.lang.InterruptedException

getAllMessages

public Message[] getAllMessages()
                         throws java.lang.InterruptedException
Specified by:
getAllMessages in interface MessageQueueAdapter
Throws:
java.lang.InterruptedException

getUpToMessages

public Message[] getUpToMessages(int max)
                          throws java.lang.InterruptedException
Specified by:
getUpToMessages in interface MessageQueueAdapter
Throws:
java.lang.InterruptedException

getAtLeastMessages

public Message[] getAtLeastMessages(int min)
                             throws java.lang.InterruptedException
Specified by:
getAtLeastMessages in interface MessageQueueAdapter
Throws:
java.lang.InterruptedException

clear

public void clear()
Specified by:
clear in interface MessageQueueAdapter

toString

public java.lang.String toString()

getDiscardPolicyName

public java.lang.String getDiscardPolicyName()
Specified by:
getDiscardPolicyName in interface MessageQueueAdapter

getOrderPolicyName

public java.lang.String getOrderPolicyName()
Specified by:
getOrderPolicyName in interface MessageQueueAdapter

addDiscardListener

public void addDiscardListener(MessageQueue.DiscardListener listener)
Specified by:
addDiscardListener in interface MessageQueueAdapter

removeDiscardListener

public void removeDiscardListener(MessageQueue.DiscardListener listener)
Specified by:
removeDiscardListener in interface MessageQueueAdapter