Package org.apache.qpid.server.session
Class AbstractAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
- java.lang.Object
-
- org.apache.qpid.server.model.AbstractConfiguredObject<S>
-
- org.apache.qpid.server.session.AbstractAMQPSession<S,X>
-
- All Implemented Interfaces:
EventLoggerProvider
,ConfiguredObject<S>
,ContextProvider
,PermissionedObject
,Session<S>
,TaskExecutorProvider
,AMQPSession<S,X>
,Deletable<S>
public abstract class AbstractAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>> extends AbstractConfiguredObject<S> implements AMQPSession<S,X>, EventLoggerProvider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
AbstractConfiguredObject.CallableWithArgument<V,A>, AbstractConfiguredObject.ChainedListenableFuture<V>, AbstractConfiguredObject.ChainedSettableFuture<V>, AbstractConfiguredObject.DuplicateIdException, AbstractConfiguredObject.DuplicateNameException
-
-
Field Summary
Fields Modifier and Type Field Description protected AccessControlContext
_accessControllerContext
protected Set<AbstractConsumerTarget>
_consumersWithPendingWork
protected PublishAuthorisationCache
_publishAuthCache
protected Subject
_subject
protected List<Action<? super S>>
_taskList
protected SecurityToken
_token
-
Fields inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
SECURED_STRING_VALUE
-
Fields inherited from interface org.apache.qpid.server.model.ConfiguredObject
AWAIT_ATTAINMENT_TIMEOUT, CONTEXT, CREATED_BY, CREATED_TIME, DEFAULT_AWAIT_ATTAINMENT_TIMEOUT, DESCRIPTION, DESIRED_STATE, DURABLE, ID, LAST_UPDATED_BY, LAST_UPDATED_TIME, LIFETIME_POLICY, NAME, OVER_SIZED_ATTRIBUTE_ALTERNATIVE_TEXT, STATE, TYPE
-
Fields inherited from interface org.apache.qpid.server.model.Session
CHANNEL_ID, PRODUCER_AUTH_CACHE_SIZE, PRODUCER_AUTH_CACHE_SIZE_DEFAULT, PRODUCER_AUTH_CACHE_TIMEOUT, PRODUCER_AUTH_CACHE_TIMEOUT_DEFAULT, PRODUCER_FLOW_BLOCKED, TRANSACTION_TIMEOUT_NOTIFICATION_REPEAT_PERIOD, TRANSACTION_TIMEOUT_NOTIFICATION_REPEAT_PERIOD_DEFAULT
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractAMQPSession(Connection<?> parent, int sessionId)
protected
AbstractAMQPSession(Connection<?> parent, int sessionId, LogSubject logSubject)
-
Method Summary
-
Methods inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
addChangeListener, addChildAsync, addFutureCallback, applyToChildren, asObjectRecord, attainState, attributesAsString, attributeSet, authorise, authorise, authorise, authoriseCreateChild, awaitChildClassToAttainState, awaitChildClassToAttainState, beforeClose, beforeDelete, changeAttributes, childAdded, childRemoved, close, closeAsync, closeChildren, create, createAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, deleteChildren, deleteNoChecks, doAfter, doAfter, doAfter, doAfter, doAfter, doAfter, doAfterAlways, doAfterAlways, doCreation, doOnConfigThread, doOpening, doResolution, doSync, doSync, doValidation, findConfiguredObject, forceUpdateAllSecureAttributes, getAccessControl, getActualAttributes, getAncestor, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getChildren, getContext, getContextKeys, getContextValue, getContextValue, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getState, getStatistics, getStatistics, getSubjectWithAddedSystemRights, getSystemPrincipal, getSystemTaskControllerContext, getSystemTaskSubject, getSystemTaskSubject, getTaskExecutor, getType, getTypeClass, getUserPreferences, handleExceptionOnOpen, hasEncrypter, isDurable, isSystemProcess, isSystemSubject, logRecovered, logUpdated, managesChildStorage, newToken, notifyStateChanged, onClose, onExceptionInOpen, onOpen, onResolve, onValidate, open, openAsync, postResolve, postResolveChildren, postSetAttributes, registerWithParents, removeChangeListener, removeContextVariable, rethrowRuntimeExceptionsOnOpen, runTask, setAttributes, setAttributesAsync, setContextVariable, setEncrypter, setState, setUserPreferences, start, startAsync, stop, toString, updateModel, validateChange, validateChildDelete, validateOnCreate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.qpid.server.session.AMQPSession
block, block, close, getBlocking, getConnectionReference, getTransactionStartTimeLong, getTransactionUpdateTimeLong, getUnacknowledgedMessageCount, transportStateChanged, unblock, unblock
-
Methods inherited from interface org.apache.qpid.server.model.ConfiguredObject
addChangeListener, asObjectRecord, authorise, authorise, authorise, closeAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, findConfiguredObject, getActualAttributes, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getChildren, getContext, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getState, getStatistics, getStatistics, getType, getTypeClass, getUserPreferences, hasEncrypter, isDurable, managesChildStorage, newToken, open, openAsync, removeChangeListener, removeContextVariable, setAttributes, setAttributesAsync, setContextVariable, setUserPreferences
-
Methods inherited from interface org.apache.qpid.server.model.ContextProvider
getContextKeys, getContextValue, getContextValue
-
Methods inherited from interface org.apache.qpid.server.model.TaskExecutorProvider
getTaskExecutor
-
-
-
-
Field Detail
-
_accessControllerContext
protected final AccessControlContext _accessControllerContext
-
_subject
protected final Subject _subject
-
_token
protected final SecurityToken _token
-
_publishAuthCache
protected final PublishAuthorisationCache _publishAuthCache
-
_consumersWithPendingWork
protected final Set<AbstractConsumerTarget> _consumersWithPendingWork
-
-
Constructor Detail
-
AbstractAMQPSession
protected AbstractAMQPSession(Connection<?> parent, int sessionId)
-
AbstractAMQPSession
protected AbstractAMQPSession(Connection<?> parent, int sessionId, LogSubject logSubject)
-
-
Method Detail
-
onCreate
protected void onCreate()
- Overrides:
onCreate
in classAbstractConfiguredObject<S extends AbstractAMQPSession<S,X>>
-
getChannelId
public int getChannelId()
- Specified by:
getChannelId
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
- Specified by:
getChannelId
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
getAMQPConnection
public AMQPConnection<?> getAMQPConnection()
- Specified by:
getAMQPConnection
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
isProducerFlowBlocked
public boolean isProducerFlowBlocked()
- Specified by:
isProducerFlowBlocked
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
getUnacknowledgedMessages
public long getUnacknowledgedMessages()
- Specified by:
getUnacknowledgedMessages
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
addDeleteTask
public void addDeleteTask(Action<? super S> task)
- Specified by:
addDeleteTask
in interfaceDeletable<S extends AbstractAMQPSession<S,X>>
-
removeDeleteTask
public void removeDeleteTask(Action<? super S> task)
- Specified by:
removeDeleteTask
in interfaceDeletable<S extends AbstractAMQPSession<S,X>>
-
onDelete
protected com.google.common.util.concurrent.ListenableFuture<Void> onDelete()
- Overrides:
onDelete
in classAbstractConfiguredObject<S extends AbstractAMQPSession<S,X>>
-
getEventLogger
public EventLogger getEventLogger()
- Specified by:
getEventLogger
in interfaceEventLoggerProvider
-
addTicker
public void addTicker(Ticker ticker)
- Specified by:
addTicker
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
removeTicker
public void removeTicker(Ticker ticker)
- Specified by:
removeTicker
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
getLogSubject
public LogSubject getLogSubject()
- Specified by:
getLogSubject
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
logOperation
protected void logOperation(String operation)
- Overrides:
logOperation
in classAbstractConfiguredObject<S extends AbstractAMQPSession<S,X>>
-
processPending
public boolean processPending()
- Specified by:
processPending
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
notifyWork
public void notifyWork(X target)
- Specified by:
notifyWork
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
getConsumerCount
public final long getConsumerCount()
- Specified by:
getConsumerCount
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
- Specified by:
getConsumerCount
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
consumerAdded
public final void consumerAdded(Consumer<?,X> consumer)
- Specified by:
consumerAdded
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
consumerRemoved
public final void consumerRemoved(Consumer<?,X> consumer)
- Specified by:
consumerRemoved
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
getConsumers
public Set<? extends Consumer<?,?>> getConsumers()
- Specified by:
getConsumers
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
updateBlockedStateIfNecessary
protected abstract void updateBlockedStateIfNecessary()
-
isClosing
public abstract boolean isClosing()
-
doOnIOThreadAsync
public com.google.common.util.concurrent.ListenableFuture<Void> doOnIOThreadAsync(Runnable task)
- Specified by:
doOnIOThreadAsync
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
getBytesIn
public long getBytesIn()
- Specified by:
getBytesIn
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
getBytesOut
public long getBytesOut()
- Specified by:
getBytesOut
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
getMessagesIn
public long getMessagesIn()
- Specified by:
getMessagesIn
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
getMessagesOut
public long getMessagesOut()
- Specified by:
getMessagesOut
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
getTransactedMessagesIn
public long getTransactedMessagesIn()
- Specified by:
getTransactedMessagesIn
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
getTransactedMessagesOut
public long getTransactedMessagesOut()
- Specified by:
getTransactedMessagesOut
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
registerMessageDelivered
public void registerMessageDelivered(long messageSize)
- Specified by:
registerMessageDelivered
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
registerMessageReceived
public void registerMessageReceived(long messageSize)
- Specified by:
registerMessageReceived
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
registerTransactedMessageDelivered
public void registerTransactedMessageDelivered()
- Specified by:
registerTransactedMessageDelivered
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
registerTransactedMessageReceived
public void registerTransactedMessageReceived()
- Specified by:
registerTransactedMessageReceived
in interfaceAMQPSession<S extends AbstractAMQPSession<S,X>,X extends ConsumerTarget<X>>
-
resetStatistics
public void resetStatistics()
- Specified by:
resetStatistics
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
getProducerCount
public long getProducerCount()
- Specified by:
getProducerCount
in interfaceSession<S extends AbstractAMQPSession<S,X>>
-
addProducer
public Producer<?> addProducer(PublishingLink link, MessageDestination messageDestination)
-
removeProducer
public void removeProducer(PublishingLink link)
-
logCreated
protected void logCreated(Map<String,Object> attributes, Outcome outcome)
- Overrides:
logCreated
in classAbstractConfiguredObject<S extends AbstractAMQPSession<S,X>>
-
logDeleted
protected void logDeleted(Outcome outcome)
- Overrides:
logDeleted
in classAbstractConfiguredObject<S extends AbstractAMQPSession<S,X>>
-
-