org.apache.qpid.server.subscription
Class Subscription_0_10

java.lang.Object
  extended by org.apache.qpid.server.subscription.Subscription_0_10
All Implemented Interfaces:
ConfiguredObject<SubscriptionConfigType,SubscriptionConfig>, SubscriptionConfig, FlowCreditManager.FlowCreditManagerListener, LogSubject, Subscription

public class Subscription_0_10
extends Object
implements Subscription, FlowCreditManager.FlowCreditManagerListener, SubscriptionConfig, LogSubject


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.qpid.server.subscription.Subscription
Subscription.State, Subscription.StateListener
 
Constructor Summary
Subscription_0_10(ServerSession session, String destination, org.apache.qpid.transport.MessageAcceptMode acceptMode, org.apache.qpid.transport.MessageAcquireMode acquireMode, org.apache.qpid.transport.MessageFlowMode flowMode, FlowCreditManager_0_10 creditManager, FilterManager filters, Map<String,Object> arguments)
           
 
Method Summary
 void acknowledge(QueueEntry entry)
           
 boolean acquires()
           
 void addCredit(org.apache.qpid.transport.MessageCreditUnit unit, long value)
           
 void close()
           
 void confirmAutoClose()
           
 void creditStateChanged(boolean hasCredit)
           
 void flush()
           
 Object get(String key)
           
 Map<String,Object> getArguments()
           
 QueueEntry.SubscriptionAssignedState getAssignedState()
           
 ConfigStore getConfigStore()
           
 SubscriptionConfigType getConfigType()
           
 org.apache.qpid.framing.AMQShortString getConsumerTag()
           
 long getCreateTime()
           
 FlowCreditManager_0_10 getCreditManager()
           
 String getCreditMode()
           
 Long getDelivered()
           
 UUID getId()
           
 LogActor getLogActor()
           
 LogSubject getLogSubject()
           
 String getName()
           
 QueueEntry.SubscriptionAcquiredState getOwningState()
           
 ConfiguredObject getParent()
           
 AMQQueue getQueue()
           
 AMQQueue.Context getQueueContext()
           
 void getSendLock()
           
(package private)  ServerSession getSession()
           
 SessionConfig getSessionConfig()
           
 Subscription.State getState()
           
 long getSubscriptionID()
           
 boolean hasInterest(QueueEntry entry)
           
 boolean isActive()
           
 boolean isAutoClose()
           
 boolean isBrowser()
           
 boolean isBrowsing()
           
 boolean isClosed()
           
 boolean isDurable()
           
 boolean isExclusive()
           
 boolean isExplicitAcknowledge()
           
 boolean isSessionTransactional()
           
 boolean isStopped()
           
 boolean isSuspended()
           
 boolean isTransient()
           
 void onDequeue(QueueEntry queueEntry)
           
 void queueDeleted(AMQQueue queue)
           
(package private)  void reject(QueueEntry entry)
           
(package private)  void release(QueueEntry entry)
           
 void releaseSendLock()
           
 void restoreCredit(QueueEntry queueEntry)
           
 boolean seesRequeues()
           
 void send(QueueEntry entry)
           
 void set(String key, Object value)
           
 void setFlowMode(org.apache.qpid.transport.MessageFlowMode flowMode)
           
 void setNoLocal(boolean noLocal)
           
 void setQueue(AMQQueue queue, boolean exclusive)
           
 void setQueueContext(AMQQueue.Context queueContext)
           
 void setStateListener(Subscription.StateListener listener)
           
 void stop()
           
 String toLogString()
          Provides the log message as as String.
 boolean wouldSuspend(QueueEntry msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Subscription_0_10

public Subscription_0_10(ServerSession session,
                         String destination,
                         org.apache.qpid.transport.MessageAcceptMode acceptMode,
                         org.apache.qpid.transport.MessageAcquireMode acquireMode,
                         org.apache.qpid.transport.MessageFlowMode flowMode,
                         FlowCreditManager_0_10 creditManager,
                         FilterManager filters,
                         Map<String,Object> arguments)
Method Detail

setNoLocal

public void setNoLocal(boolean noLocal)
Specified by:
setNoLocal in interface Subscription

getQueue

public AMQQueue getQueue()
Specified by:
getQueue in interface SubscriptionConfig
Specified by:
getQueue in interface Subscription

getOwningState

public QueueEntry.SubscriptionAcquiredState getOwningState()
Specified by:
getOwningState in interface Subscription

getAssignedState

public QueueEntry.SubscriptionAssignedState getAssignedState()
Specified by:
getAssignedState in interface Subscription

setQueue

public void setQueue(AMQQueue queue,
                     boolean exclusive)
Specified by:
setQueue in interface Subscription

getConsumerTag

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

isSuspended

public boolean isSuspended()
Specified by:
isSuspended in interface Subscription

hasInterest

public boolean hasInterest(QueueEntry entry)
Specified by:
hasInterest in interface Subscription

isAutoClose

public boolean isAutoClose()
Specified by:
isAutoClose in interface Subscription

isClosed

public boolean isClosed()
Specified by:
isClosed in interface Subscription

isBrowser

public boolean isBrowser()

seesRequeues

public boolean seesRequeues()
Specified by:
seesRequeues in interface Subscription

close

public void close()
Specified by:
close in interface Subscription

getConfigStore

public ConfigStore getConfigStore()

getDelivered

public Long getDelivered()
Specified by:
getDelivered in interface SubscriptionConfig

creditStateChanged

public void creditStateChanged(boolean hasCredit)
Specified by:
creditStateChanged in interface FlowCreditManager.FlowCreditManagerListener

send

public void send(QueueEntry entry)
          throws org.apache.qpid.AMQException
Specified by:
send in interface Subscription
Throws:
org.apache.qpid.AMQException

reject

void reject(QueueEntry entry)

release

void release(QueueEntry entry)

queueDeleted

public void queueDeleted(AMQQueue queue)
Specified by:
queueDeleted in interface Subscription

wouldSuspend

public boolean wouldSuspend(QueueEntry msg)
Specified by:
wouldSuspend in interface Subscription

getSendLock

public void getSendLock()
Specified by:
getSendLock in interface Subscription

releaseSendLock

public void releaseSendLock()
Specified by:
releaseSendLock in interface Subscription

restoreCredit

public void restoreCredit(QueueEntry queueEntry)
Specified by:
restoreCredit in interface Subscription

onDequeue

public void onDequeue(QueueEntry queueEntry)
Specified by:
onDequeue in interface Subscription

setStateListener

public void setStateListener(Subscription.StateListener listener)
Specified by:
setStateListener in interface Subscription

getState

public Subscription.State getState()
Specified by:
getState in interface Subscription

getQueueContext

public AMQQueue.Context getQueueContext()
Specified by:
getQueueContext in interface Subscription

setQueueContext

public void setQueueContext(AMQQueue.Context queueContext)
Specified by:
setQueueContext in interface Subscription

isActive

public boolean isActive()
Specified by:
isActive in interface Subscription

confirmAutoClose

public void confirmAutoClose()
Specified by:
confirmAutoClose in interface Subscription

set

public void set(String key,
                Object value)
Specified by:
set in interface Subscription

get

public Object get(String key)
Specified by:
get in interface Subscription

getCreditManager

public FlowCreditManager_0_10 getCreditManager()

stop

public void stop()

addCredit

public void addCredit(org.apache.qpid.transport.MessageCreditUnit unit,
                      long value)

setFlowMode

public void setFlowMode(org.apache.qpid.transport.MessageFlowMode flowMode)

isStopped

public boolean isStopped()

acquires

public boolean acquires()
Specified by:
acquires in interface Subscription

acknowledge

public void acknowledge(QueueEntry entry)

flush

public void flush()
           throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

getSubscriptionID

public long getSubscriptionID()
Specified by:
getSubscriptionID in interface Subscription

getLogActor

public LogActor getLogActor()
Specified by:
getLogActor in interface Subscription

isTransient

public boolean isTransient()
Specified by:
isTransient in interface Subscription

getSession

ServerSession getSession()

getSessionConfig

public SessionConfig getSessionConfig()
Specified by:
getSessionConfig in interface SubscriptionConfig

isBrowsing

public boolean isBrowsing()
Specified by:
isBrowsing in interface SubscriptionConfig

isExclusive

public boolean isExclusive()
Specified by:
isExclusive in interface SubscriptionConfig

getParent

public ConfiguredObject getParent()
Specified by:
getParent in interface ConfiguredObject<SubscriptionConfigType,SubscriptionConfig>

isDurable

public boolean isDurable()
Specified by:
isDurable in interface ConfiguredObject<SubscriptionConfigType,SubscriptionConfig>

getConfigType

public SubscriptionConfigType getConfigType()
Specified by:
getConfigType in interface ConfiguredObject<SubscriptionConfigType,SubscriptionConfig>

isExplicitAcknowledge

public boolean isExplicitAcknowledge()
Specified by:
isExplicitAcknowledge in interface SubscriptionConfig

getCreditMode

public String getCreditMode()
Specified by:
getCreditMode in interface SubscriptionConfig

getId

public UUID getId()
Specified by:
getId in interface ConfiguredObject<SubscriptionConfigType,SubscriptionConfig>

getName

public String getName()
Specified by:
getName in interface SubscriptionConfig

getArguments

public Map<String,Object> getArguments()
Specified by:
getArguments in interface SubscriptionConfig

isSessionTransactional

public boolean isSessionTransactional()
Specified by:
isSessionTransactional in interface Subscription

getCreateTime

public long getCreateTime()
Specified by:
getCreateTime in interface ConfiguredObject<SubscriptionConfigType,SubscriptionConfig>

toLogString

public String toLogString()
Description copied from interface: LogSubject
Provides the log message as as String.

Specified by:
toLogString in interface LogSubject

getLogSubject

public LogSubject getLogSubject()


Licensed to the Apache Software Foundation