org.jacorb.notification.queue
Class RWLockEventQueueDecorator

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

public class RWLockEventQueueDecorator
extends Object
implements MessageQueueAdapter

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)
           
 String getDiscardPolicyName()
           
 Message getMessageBlocking()
           
 Message getMessageNoBlock()
           
 String getOrderPolicyName()
           
 int getPendingMessagesCount()
           
 Message[] getUpToMessages(int max)
           
 boolean hasPendingMessages()
           
 void removeDiscardListener(MessageQueue.DiscardListener listener)
           
 void replaceDelegate(MessageQueueAdapter newDelegate)
           
 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 InterruptedException
Throws:
InterruptedException

enqeue

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

hasPendingMessages

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

getPendingMessagesCount

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

getMessageBlocking

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

getMessageNoBlock

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

getAllMessages

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

getUpToMessages

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

getAtLeastMessages

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

clear

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

toString

public String toString()
Overrides:
toString in class Object

getDiscardPolicyName

public String getDiscardPolicyName()
Specified by:
getDiscardPolicyName in interface MessageQueueAdapter

getOrderPolicyName

public 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


Copyright © 2015 JacORB. All rights reserved.