public class ServerSession extends Session implements AMQSessionModel<ServerSession>, LogSubject, AsyncAutoCommitTransaction.FutureRecorder, Deletable<ServerSession>
Modifier and Type | Class and Description |
---|---|
static interface |
ServerSession.MessageDispositionChangeListener |
Session.State
UNLIMITED_CREDIT
Constructor and Description |
---|
ServerSession(Connection connection,
SessionDelegate delegate,
Binary name,
long expiry) |
awaitOpen, closed, complete, exception, flushProcessed, getChannel, getCommandsIn, getCommandsOut, getDetachCode, getName, getSessionListener, getState, getStateLock, invoke, invoke, invoke, isBytesFull, isClosing, isCommandsFull, isFlowBlocked, isTransacted, messageTransfer, messageTransfer, nextCommandId, notifyFailoverRequired, processed, processed, processed, processed, setAutoSync, setDetachCode, setSessionListener, setTransacted, shouldIssueFlush, sync, sync, toString
dtxCommit, dtxEnd, dtxForget, dtxGetTimeout, dtxPrepare, dtxRecover, dtxRollback, dtxSelect, dtxSetTimeout, dtxStart, exchangeBind, exchangeBound, exchangeDeclare, exchangeDelete, exchangeQuery, exchangeUnbind, executionException, executionResult, executionSync, messageAccept, messageAcquire, messageCancel, messageFlow, messageFlush, messageReject, messageRelease, messageResume, messageSetFlowMode, messageStop, messageSubscribe, messageTransfer, queueDeclare, queueDelete, queuePurge, queueQuery, txCommit, txRollback, txSelect
public ServerSession(Connection connection, SessionDelegate delegate, Binary name, long expiry)
public AccessControlContext getAccessControllerContext()
protected void setState(Session.State state)
public int enqueue(MessageTransferMessage message, InstanceProperties instanceProperties, MessageDestination exchange)
public void sendMessage(MessageTransfer xfr, Runnable postIdSettingAction)
public void onMessageDispositionChange(MessageTransfer xfr, ServerSession.MessageDispositionChangeListener acceptListener)
public void accept(RangeSet ranges)
public void release(RangeSet ranges, boolean setRedelivered)
public void reject(RangeSet ranges)
public void dispositionChange(RangeSet ranges, org.apache.qpid.server.protocol.v0_10.ServerSession.MessageDispositionAction action)
public void removeDispositionListener(Method method)
public void onClose()
protected void awaitClose()
awaitClose
in class Session
public void acknowledge(ConsumerImpl consumer, ConsumerTarget_0_10 target, MessageInstance entry)
public void register(String destination, ConsumerTarget_0_10 sub)
public void register(ConsumerImpl consumerImpl)
public ConsumerTarget_0_10 getSubscription(String destination)
public void unregister(ConsumerTarget_0_10 sub)
public boolean isTransactional()
public void selectTx()
public void selectDtx()
public void startDtx(Xid xid, boolean join, boolean resume) throws JoinAndResumeDtxException, UnknownDtxBranchException, AlreadyKnownDtxException, DtxNotSelectedException
public void endDtx(Xid xid, boolean fail, boolean suspend) throws NotAssociatedDtxException, UnknownDtxBranchException, DtxNotSelectedException, SuspendAndFailDtxException, TimeoutDtxException
public long getTimeoutDtx(Xid xid) throws UnknownDtxBranchException
UnknownDtxBranchException
public void setTimeoutDtx(Xid xid, long timeout) throws UnknownDtxBranchException
UnknownDtxBranchException
public void prepareDtx(Xid xid) throws UnknownDtxBranchException, IncorrectDtxStateException, StoreException, RollbackOnlyDtxException, TimeoutDtxException
public void commitDtx(Xid xid, boolean onePhase) throws UnknownDtxBranchException, IncorrectDtxStateException, StoreException, RollbackOnlyDtxException, TimeoutDtxException
public void rollbackDtx(Xid xid) throws UnknownDtxBranchException, IncorrectDtxStateException, StoreException, TimeoutDtxException
public void forgetDtx(Xid xid) throws UnknownDtxBranchException, IncorrectDtxStateException
public void commit()
public void rollback()
public Long getTxnCommits()
getTxnCommits
in interface AMQSessionModel<ServerSession>
public Long getTxnRejects()
getTxnRejects
in interface AMQSessionModel<ServerSession>
public int getChannelId()
getChannelId
in interface AMQSessionModel<ServerSession>
public Long getTxnCount()
getTxnCount
in interface AMQSessionModel<ServerSession>
public Long getTxnStart()
getTxnStart
in interface AMQSessionModel<ServerSession>
public Principal getAuthorizedPrincipal()
public Subject getAuthorizedSubject()
public void addDeleteTask(Action<? super ServerSession> task)
addDeleteTask
in interface Deletable<ServerSession>
public void removeDeleteTask(Action<? super ServerSession> task)
removeDeleteTask
in interface Deletable<ServerSession>
public Object getReference()
public MessageStore getMessageStore()
public VirtualHostImpl<?,?,?> getVirtualHost()
public boolean isDurable()
public long getCreateTime()
public UUID getId()
getId
in interface AMQSessionModel<ServerSession>
public AMQPConnection<?> getAMQPConnection()
getAMQPConnection
in interface AMQSessionModel<ServerSession>
public String getClientID()
getClientID
in interface AMQSessionModel<ServerSession>
public ServerConnection getConnection()
getConnection
in class Session
public LogSubject getLogSubject()
getLogSubject
in interface AMQSessionModel<ServerSession>
public void checkTransactionStatus(long openWarn, long openClose, long idleWarn, long idleClose)
AMQSessionModel
checkTransactionStatus
in interface AMQSessionModel<ServerSession>
openWarn
- time in milliseconds before alerting on open transactionopenClose
- time in milliseconds before closing connection with open transactionidleWarn
- time in milliseconds before alerting on idle transactionidleClose
- time in milliseconds before closing connection with idle transactionpublic void block(AMQQueue queue)
block
in interface AMQSessionModel<ServerSession>
public void block()
block
in interface AMQSessionModel<ServerSession>
public void unblock(AMQQueue queue)
unblock
in interface AMQSessionModel<ServerSession>
public void unblock()
unblock
in interface AMQSessionModel<ServerSession>
public void transportStateChanged()
transportStateChanged
in interface AMQSessionModel<ServerSession>
public Object getConnectionReference()
getConnectionReference
in interface AMQSessionModel<ServerSession>
public String toLogString()
LogSubject
toLogString
in interface LogSubject
public void close(AMQConstant cause, String message)
close
in interface AMQSessionModel<ServerSession>
public void close()
close
in interface AMQSessionModel<ServerSession>
close
in class Session
public void receivedComplete()
public int getUnacknowledgedMessageCount()
getUnacknowledgedMessageCount
in interface AMQSessionModel<ServerSession>
public boolean getBlocking()
getBlocking
in interface AMQSessionModel<ServerSession>
public void completeAsyncCommands()
public void awaitCommandCompletion()
public Object getAsyncCommandMark()
public void recordFuture(com.google.common.util.concurrent.ListenableFuture<Void> future, ServerTransaction.Action action)
recordFuture
in interface AsyncAutoCommitTransaction.FutureRecorder
public int getConsumerCount()
getConsumerCount
in interface AMQSessionModel<ServerSession>
public Collection<Consumer<?>> getConsumers()
getConsumers
in interface AMQSessionModel<ServerSession>
public void addConsumerListener(ConsumerListener listener)
addConsumerListener
in interface AMQSessionModel<ServerSession>
public void removeConsumerListener(ConsumerListener listener)
removeConsumerListener
in interface AMQSessionModel<ServerSession>
public void setModelObject(Session<?> session)
setModelObject
in interface AMQSessionModel<ServerSession>
public Session<?> getModelObject()
getModelObject
in interface AMQSessionModel<ServerSession>
public long getTransactionStartTime()
AMQSessionModel
getTransactionStartTime
in interface AMQSessionModel<ServerSession>
public long getTransactionUpdateTime()
AMQSessionModel
getTransactionUpdateTime
in interface AMQSessionModel<ServerSession>
public boolean processPending()
processPending
in interface AMQSessionModel<ServerSession>
public void addTicker(Ticker ticker)
addTicker
in interface AMQSessionModel<ServerSession>
public void removeTicker(Ticker ticker)
removeTicker
in interface AMQSessionModel<ServerSession>
public void notifyConsumerTargetCurrentStates()
notifyConsumerTargetCurrentStates
in interface AMQSessionModel<ServerSession>
public void ensureConsumersNoticedStateChange()
ensureConsumersNoticedStateChange
in interface AMQSessionModel<ServerSession>
public final long getMaxUncommittedInMemorySize()
public int compareTo(AMQSessionModel o)
compareTo
in interface Comparable<AMQSessionModel>
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.