org.apache.qpid.server.queue
Class SubscriptionTestHelper

java.lang.Object
  extended by org.apache.qpid.server.queue.SubscriptionTestHelper
All Implemented Interfaces:
org.apache.qpid.server.subscription.Subscription

public class SubscriptionTestHelper
extends Object
implements org.apache.qpid.server.subscription.Subscription


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.qpid.server.subscription.Subscription
org.apache.qpid.server.subscription.Subscription.State, org.apache.qpid.server.subscription.Subscription.StateListener
 
Constructor Summary
SubscriptionTestHelper(Object key)
           
SubscriptionTestHelper(Object key, boolean isSuspended)
           
SubscriptionTestHelper(Object key, List<org.apache.qpid.server.queue.QueueEntry> messages)
           
 
Method Summary
 boolean acquires()
           
 void addToResendQueue(org.apache.qpid.server.queue.QueueEntry msg)
           
 void close()
           
 void confirmAutoClose()
           
 void enqueueForPreDelivery(org.apache.qpid.server.queue.QueueEntry msg, boolean deliverFirst)
           
 boolean equals(Object o)
           
 boolean filtersMessages()
           
 Object get(String key)
           
 org.apache.qpid.server.queue.QueueEntry.SubscriptionAssignedState getAssignedState()
           
 org.apache.qpid.server.AMQChannel getChannel()
           
 org.apache.qpid.framing.AMQShortString getConsumerTag()
           
 org.apache.qpid.server.logging.LogActor getLogActor()
           
(package private)  List<org.apache.qpid.server.queue.QueueEntry> getMessages()
           
 Queue<org.apache.qpid.server.queue.QueueEntry> getNextQueue(Queue<org.apache.qpid.server.queue.QueueEntry> messages)
           
 org.apache.qpid.server.queue.QueueEntry.SubscriptionAcquiredState getOwningState()
           
 Queue<org.apache.qpid.server.queue.QueueEntry> getPreDeliveryQueue()
           
 org.apache.qpid.server.queue.AMQQueue getQueue()
           
 org.apache.qpid.server.queue.AMQQueue.Context getQueueContext()
           
 Queue<org.apache.qpid.server.queue.QueueEntry> getResendQueue()
           
 void getSendLock()
           
 org.apache.qpid.server.subscription.Subscription.State getState()
           
 long getSubscriptionID()
           
 int hashCode()
           
 boolean hasInterest(org.apache.qpid.server.queue.QueueEntry msg)
           
 boolean isActive()
           
 boolean isAutoClose()
           
 boolean isBrowser()
           
 boolean isClosed()
           
 boolean isSessionTransactional()
           
 boolean isSuspended()
           
 boolean isTransient()
           
 void onDequeue(org.apache.qpid.server.queue.QueueEntry queueEntry)
           
 void queueDeleted(org.apache.qpid.server.queue.AMQQueue queue)
           
 void releaseSendLock()
           
 void resend(org.apache.qpid.server.queue.QueueEntry entry)
           
 void restoreCredit(org.apache.qpid.server.queue.QueueEntry queueEntry)
           
 boolean seesRequeues()
           
 void send(org.apache.qpid.server.queue.QueueEntry msg)
           
 void set(String key, Object value)
           
 boolean setLastSeenEntry(org.apache.qpid.server.queue.QueueEntry expected, org.apache.qpid.server.queue.QueueEntry newValue)
           
 void setNoLocal(boolean noLocal)
           
 void setQueue(org.apache.qpid.server.queue.AMQQueue queue, boolean exclusive)
           
 void setQueueContext(org.apache.qpid.server.queue.AMQQueue.Context queueContext)
           
 void setStateListener(org.apache.qpid.server.subscription.Subscription.StateListener listener)
           
 void setSuspended(boolean suspended)
           
 void start()
           
 String toString()
           
 boolean wouldSuspend(org.apache.qpid.server.queue.QueueEntry msg)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubscriptionTestHelper

public SubscriptionTestHelper(Object key)

SubscriptionTestHelper

public SubscriptionTestHelper(Object key,
                              boolean isSuspended)

SubscriptionTestHelper

SubscriptionTestHelper(Object key,
                       List<org.apache.qpid.server.queue.QueueEntry> messages)
Method Detail

getMessages

List<org.apache.qpid.server.queue.QueueEntry> getMessages()

setQueue

public void setQueue(org.apache.qpid.server.queue.AMQQueue queue,
                     boolean exclusive)
Specified by:
setQueue in interface org.apache.qpid.server.subscription.Subscription

setNoLocal

public void setNoLocal(boolean noLocal)
Specified by:
setNoLocal in interface org.apache.qpid.server.subscription.Subscription

send

public void send(org.apache.qpid.server.queue.QueueEntry msg)
Specified by:
send in interface org.apache.qpid.server.subscription.Subscription

setSuspended

public void setSuspended(boolean suspended)

isSuspended

public boolean isSuspended()
Specified by:
isSuspended in interface org.apache.qpid.server.subscription.Subscription

wouldSuspend

public boolean wouldSuspend(org.apache.qpid.server.queue.QueueEntry msg)
Specified by:
wouldSuspend in interface org.apache.qpid.server.subscription.Subscription

addToResendQueue

public void addToResendQueue(org.apache.qpid.server.queue.QueueEntry msg)

getSendLock

public void getSendLock()
Specified by:
getSendLock in interface org.apache.qpid.server.subscription.Subscription

releaseSendLock

public void releaseSendLock()
Specified by:
releaseSendLock in interface org.apache.qpid.server.subscription.Subscription

resend

public void resend(org.apache.qpid.server.queue.QueueEntry entry)

onDequeue

public void onDequeue(org.apache.qpid.server.queue.QueueEntry queueEntry)
Specified by:
onDequeue in interface org.apache.qpid.server.subscription.Subscription

restoreCredit

public void restoreCredit(org.apache.qpid.server.queue.QueueEntry queueEntry)
Specified by:
restoreCredit in interface org.apache.qpid.server.subscription.Subscription

setStateListener

public void setStateListener(org.apache.qpid.server.subscription.Subscription.StateListener listener)
Specified by:
setStateListener in interface org.apache.qpid.server.subscription.Subscription

getState

public org.apache.qpid.server.subscription.Subscription.State getState()
Specified by:
getState in interface org.apache.qpid.server.subscription.Subscription

getQueueContext

public org.apache.qpid.server.queue.AMQQueue.Context getQueueContext()
Specified by:
getQueueContext in interface org.apache.qpid.server.subscription.Subscription

setQueueContext

public void setQueueContext(org.apache.qpid.server.queue.AMQQueue.Context queueContext)
Specified by:
setQueueContext in interface org.apache.qpid.server.subscription.Subscription

setLastSeenEntry

public boolean setLastSeenEntry(org.apache.qpid.server.queue.QueueEntry expected,
                                org.apache.qpid.server.queue.QueueEntry newValue)

getChannel

public org.apache.qpid.server.AMQChannel getChannel()

start

public void start()

getConsumerTag

public org.apache.qpid.framing.AMQShortString getConsumerTag()
Specified by:
getConsumerTag in interface org.apache.qpid.server.subscription.Subscription

getSubscriptionID

public long getSubscriptionID()
Specified by:
getSubscriptionID in interface org.apache.qpid.server.subscription.Subscription

isActive

public boolean isActive()
Specified by:
isActive in interface org.apache.qpid.server.subscription.Subscription

confirmAutoClose

public void confirmAutoClose()
Specified by:
confirmAutoClose in interface org.apache.qpid.server.subscription.Subscription

set

public void set(String key,
                Object value)
Specified by:
set in interface org.apache.qpid.server.subscription.Subscription

get

public Object get(String key)
Specified by:
get in interface org.apache.qpid.server.subscription.Subscription

getLogActor

public org.apache.qpid.server.logging.LogActor getLogActor()
Specified by:
getLogActor in interface org.apache.qpid.server.subscription.Subscription

isTransient

public boolean isTransient()
Specified by:
isTransient in interface org.apache.qpid.server.subscription.Subscription

getQueue

public org.apache.qpid.server.queue.AMQQueue getQueue()
Specified by:
getQueue in interface org.apache.qpid.server.subscription.Subscription

getOwningState

public org.apache.qpid.server.queue.QueueEntry.SubscriptionAcquiredState getOwningState()
Specified by:
getOwningState in interface org.apache.qpid.server.subscription.Subscription

getAssignedState

public org.apache.qpid.server.queue.QueueEntry.SubscriptionAssignedState getAssignedState()
Specified by:
getAssignedState in interface org.apache.qpid.server.subscription.Subscription

queueDeleted

public void queueDeleted(org.apache.qpid.server.queue.AMQQueue queue)
Specified by:
queueDeleted in interface org.apache.qpid.server.subscription.Subscription

filtersMessages

public boolean filtersMessages()

hasInterest

public boolean hasInterest(org.apache.qpid.server.queue.QueueEntry msg)
Specified by:
hasInterest in interface org.apache.qpid.server.subscription.Subscription

isAutoClose

public boolean isAutoClose()
Specified by:
isAutoClose in interface org.apache.qpid.server.subscription.Subscription

getPreDeliveryQueue

public Queue<org.apache.qpid.server.queue.QueueEntry> getPreDeliveryQueue()

getResendQueue

public Queue<org.apache.qpid.server.queue.QueueEntry> getResendQueue()

getNextQueue

public Queue<org.apache.qpid.server.queue.QueueEntry> getNextQueue(Queue<org.apache.qpid.server.queue.QueueEntry> messages)

enqueueForPreDelivery

public void enqueueForPreDelivery(org.apache.qpid.server.queue.QueueEntry msg,
                                  boolean deliverFirst)

close

public void close()
Specified by:
close in interface org.apache.qpid.server.subscription.Subscription

isClosed

public boolean isClosed()
Specified by:
isClosed in interface org.apache.qpid.server.subscription.Subscription

acquires

public boolean acquires()
Specified by:
acquires in interface org.apache.qpid.server.subscription.Subscription

seesRequeues

public boolean seesRequeues()
Specified by:
seesRequeues in interface org.apache.qpid.server.subscription.Subscription

isBrowser

public boolean isBrowser()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

isSessionTransactional

public boolean isSessionTransactional()
Specified by:
isSessionTransactional in interface org.apache.qpid.server.subscription.Subscription


Licensed to the Apache Software Foundation