public class AMQProtocolEngine extends Object implements org.apache.qpid.protocol.ServerProtocolEngine, AMQProtocolSession<AMQProtocolEngine>
| Modifier and Type | Class and Description |
|---|---|
class |
AMQProtocolEngine.WriteDeliverMethod |
| Constructor and Description |
|---|
AMQProtocolEngine(Broker broker,
org.apache.qpid.transport.network.NetworkConnection network,
long connectionId,
Port port,
Transport transport) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChannel(AMQChannel<AMQProtocolEngine> channel)
Associate a channel with this session.
|
void |
addDeleteTask(Action<? super AMQProtocolEngine> task) |
void |
addSessionListener(SessionModelListener listener) |
void |
block() |
boolean |
channelAwaitingClosure(int channelId)
Check to see if this chanel is closing
|
void |
close(org.apache.qpid.protocol.AMQConstant cause,
String message) |
void |
closeChannel(int channelId)
Close a specific channel.
|
void |
closeChannel(int channelId,
org.apache.qpid.protocol.AMQConstant cause,
String message) |
void |
closeChannelOk(int channelId)
Marks the specific channel as closed.
|
void |
closed() |
void |
closeProtocolSession() |
void |
closeSession()
This must be called when the session is _closed in order to free up any resources managed by the session.
|
void |
closeSession(AMQChannel<AMQProtocolEngine> session,
org.apache.qpid.protocol.AMQConstant cause,
String message) |
void |
contentBodyReceived(int channelId,
org.apache.qpid.framing.ContentBody body) |
void |
contentHeaderReceived(int channelId,
org.apache.qpid.framing.ContentHeaderBody body) |
ClientDeliveryMethod |
createDeliveryMethod(int channelId) |
void |
exception(Throwable throwable) |
void |
flushBatched() |
String |
getAddress() |
AMQChannel<AMQProtocolEngine> |
getAndAssertChannel(int channelId) |
Principal |
getAuthorizedPrincipal() |
Subject |
getAuthorizedSubject() |
AMQChannel<AMQProtocolEngine> |
getChannel(int channelId)
Get the channel for this session associated with the specified id.
|
List<AMQChannel<AMQProtocolEngine>> |
getChannels() |
String |
getClientId() |
String |
getClientProduct() |
String |
getClientVersion() |
long |
getConnectionId() |
org.apache.qpid.framing.AMQShortString |
getContextKey()
Get the context key associated with this session.
|
StatisticsCounter |
getDataDeliveryStatistics() |
StatisticsCounter |
getDataReceiptStatistics() |
EventLogger |
getEventLogger() |
Object |
getKey() |
long |
getLastIoTime() |
long |
getLastReadTime() |
long |
getLastReceivedTime() |
long |
getLastWriteTime() |
SocketAddress |
getLocalAddress()
Return the local socket address for the connection
|
String |
getLocalFQDN()
Get the fully qualified domain name of the local address to which this session is bound.
|
LogSubject |
getLogSubject() |
long |
getMaxFrameSize() |
Long |
getMaximumNumberOfChannels() |
int |
getMessageCompressionThreshold() |
StatisticsCounter |
getMessageDeliveryStatistics() |
StatisticsCounter |
getMessageReceiptStatistics() |
org.apache.qpid.framing.MethodDispatcher |
getMethodDispatcher() |
org.apache.qpid.framing.MethodRegistry |
getMethodRegistry() |
Principal |
getPeerPrincipal() |
Port<?> |
getPort() |
byte |
getProtocolMajorVersion() |
byte |
getProtocolMinorVersion() |
ProtocolOutputConverter |
getProtocolOutputConverter() |
org.apache.qpid.framing.ProtocolVersion |
getProtocolVersion() |
long |
getReadBytes() |
Lock |
getReceivedLock() |
Object |
getReference() |
org.apache.qpid.framing.MethodRegistry |
getRegistry() |
SocketAddress |
getRemoteAddress() |
String |
getRemoteAddressString() |
String |
getRemoteContainerName() |
String |
getRemoteProcessPid() |
SaslServer |
getSaslServer() |
long |
getSessionCountLimit() |
long |
getSessionID() |
List<AMQChannel<AMQProtocolEngine>> |
getSessionModels() |
Subject |
getSubject() |
Transport |
getTransport() |
VirtualHostImpl<?,?,?> |
getVirtualHost() |
String |
getVirtualHostName() |
long |
getWrittenBytes() |
void |
heartbeatBodyReceived(int channelId,
org.apache.qpid.framing.HeartbeatBody body) |
void |
initHeartbeats(int delay)
Initialise heartbeats on the session.
|
boolean |
isClosed() |
boolean |
isCloseWhenNoRoute()
Used for 0-8/0-9/0-9-1 connections to choose to close
the connection when a transactional session receives a 'mandatory' message which
can't be routed rather than returning the message.
|
boolean |
isClosing() |
boolean |
isCompressionSupported() |
boolean |
isDurable() |
boolean |
isSessionNameUnique(byte[] name) |
boolean |
isStopped() |
void |
methodFrameReceived(int channelId,
org.apache.qpid.framing.AMQMethodBody methodBody) |
void |
readerIdle() |
void |
received(ByteBuffer msg) |
void |
registerMessageDelivered(long messageSize) |
void |
registerMessageReceived(long messageSize,
long timestamp) |
void |
removeChannel(int channelId)
In our current implementation this is used by the clustering code.
|
void |
removeDeleteTask(Action<? super AMQProtocolEngine> task) |
void |
removeSessionListener(SessionModelListener listener) |
void |
resetStatistics() |
void |
setAuthorizedSubject(Subject authorizedSubject) |
void |
setClientProperties(org.apache.qpid.framing.FieldTable clientProperties) |
void |
setContextKey(org.apache.qpid.framing.AMQShortString contextKey)
Set the context key associated with this session.
|
void |
setDeferFlush(boolean deferFlush) |
void |
setMaxFrameSize(long frameMax) |
void |
setMaximumNumberOfChannels(Long value) |
void |
setNetworkConnection(org.apache.qpid.transport.network.NetworkConnection network) |
void |
setNetworkConnection(org.apache.qpid.transport.network.NetworkConnection network,
org.apache.qpid.transport.Sender<ByteBuffer> sender) |
void |
setSaslServer(SaslServer saslServer)
Set the sasl server that is to perform authentication for this session.
|
void |
setSender(org.apache.qpid.transport.Sender<ByteBuffer> sender) |
void |
setVirtualHost(VirtualHostImpl<?,?,?> virtualHost) |
void |
stop() |
String |
toString() |
void |
unblock() |
void |
writeFrame(org.apache.qpid.framing.AMQDataBlock frame)
Convenience method that writes a frame to the protocol session.
|
void |
writerIdle() |
public Subject getSubject()
getSubject in interface org.apache.qpid.protocol.ServerProtocolEnginepublic void setNetworkConnection(org.apache.qpid.transport.network.NetworkConnection network)
public void setNetworkConnection(org.apache.qpid.transport.network.NetworkConnection network,
org.apache.qpid.transport.Sender<ByteBuffer> sender)
setNetworkConnection in interface org.apache.qpid.protocol.ProtocolEnginepublic long getSessionID()
getSessionID in interface AMQProtocolSession<AMQProtocolEngine>public void setMaxFrameSize(long frameMax)
setMaxFrameSize in interface AMQProtocolSession<AMQProtocolEngine>public long getMaxFrameSize()
getMaxFrameSize in interface AMQProtocolSession<AMQProtocolEngine>public boolean isClosing()
isClosing in interface AMQProtocolSession<AMQProtocolEngine>public void flushBatched()
flushBatched in interface AMQProtocolSession<AMQProtocolEngine>public ClientDeliveryMethod createDeliveryMethod(int channelId)
createDeliveryMethod in interface AMQProtocolSession<AMQProtocolEngine>public void received(ByteBuffer msg)
received in interface org.apache.qpid.transport.Receiver<ByteBuffer>public void methodFrameReceived(int channelId,
org.apache.qpid.framing.AMQMethodBody methodBody)
methodFrameReceived in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSessionpublic void contentHeaderReceived(int channelId,
org.apache.qpid.framing.ContentHeaderBody body)
throws org.apache.qpid.AMQException
contentHeaderReceived in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSessionorg.apache.qpid.AMQExceptionpublic void contentBodyReceived(int channelId,
org.apache.qpid.framing.ContentBody body)
throws org.apache.qpid.AMQException
contentBodyReceived in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSessionorg.apache.qpid.AMQExceptionpublic void heartbeatBodyReceived(int channelId,
org.apache.qpid.framing.HeartbeatBody body)
heartbeatBodyReceived in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSessionpublic void writeFrame(org.apache.qpid.framing.AMQDataBlock frame)
writeFrame in interface org.apache.qpid.protocol.AMQProtocolWriterframe - the frame to writepublic org.apache.qpid.framing.AMQShortString getContextKey()
AMQProtocolSessiongetContextKey in interface AMQProtocolSession<AMQProtocolEngine>public void setContextKey(org.apache.qpid.framing.AMQShortString contextKey)
AMQProtocolSessionsetContextKey in interface AMQProtocolSession<AMQProtocolEngine>contextKey - the context keypublic List<AMQChannel<AMQProtocolEngine>> getChannels()
getChannels in interface AMQProtocolSession<AMQProtocolEngine>public AMQChannel<AMQProtocolEngine> getAndAssertChannel(int channelId) throws org.apache.qpid.AMQException
org.apache.qpid.AMQExceptionpublic AMQChannel<AMQProtocolEngine> getChannel(int channelId)
AMQProtocolSessiongetChannel in interface AMQProtocolSession<AMQProtocolEngine>channelId - the channel id which must be validpublic boolean channelAwaitingClosure(int channelId)
AMQProtocolSessionchannelAwaitingClosure in interface AMQProtocolSession<AMQProtocolEngine>channelId - id to checkpublic void addChannel(AMQChannel<AMQProtocolEngine> channel) throws org.apache.qpid.AMQException
AMQProtocolSessionaddChannel in interface AMQProtocolSession<AMQProtocolEngine>channel - the channel to associate with this session. It is an error to associate the same channel with more
than one session but this is not validated.org.apache.qpid.AMQExceptionpublic Long getMaximumNumberOfChannels()
getMaximumNumberOfChannels in interface AMQProtocolSession<AMQProtocolEngine>public void setMaximumNumberOfChannels(Long value)
setMaximumNumberOfChannels in interface AMQProtocolSession<AMQProtocolEngine>public void closeChannel(int channelId)
closeChannel in interface AMQProtocolSession<AMQProtocolEngine>channelId - id of the channel to closeIllegalArgumentException - if the channel id is not validpublic void closeChannel(int channelId,
org.apache.qpid.protocol.AMQConstant cause,
String message)
closeChannel in interface AMQProtocolSession<AMQProtocolEngine>public void closeChannelOk(int channelId)
AMQProtocolSessioncloseChannelOk in interface AMQProtocolSession<AMQProtocolEngine>channelId - id of the channel to closepublic void removeChannel(int channelId)
removeChannel in interface AMQProtocolSession<AMQProtocolEngine>channelId - The channel to removepublic void initHeartbeats(int delay)
initHeartbeats in interface AMQProtocolSession<AMQProtocolEngine>delay - delay in seconds (not ms)public void closeSession()
closeSession in interface AMQProtocolSession<AMQProtocolEngine>public void closeProtocolSession()
closeProtocolSession in interface AMQProtocolSession<AMQProtocolEngine>public Object getKey()
getKey in interface AMQProtocolSession<AMQProtocolEngine>public String getLocalFQDN()
getLocalFQDN in interface AMQProtocolSession<AMQProtocolEngine>public SaslServer getSaslServer()
getSaslServer in interface AMQProtocolSession<AMQProtocolEngine>public void setSaslServer(SaslServer saslServer)
AMQProtocolSessionsetSaslServer in interface AMQProtocolSession<AMQProtocolEngine>public void setClientProperties(org.apache.qpid.framing.FieldTable clientProperties)
setClientProperties in interface AMQProtocolSession<AMQProtocolEngine>public byte getProtocolMajorVersion()
getProtocolMajorVersion in interface org.apache.qpid.protocol.ProtocolVersionAwarepublic org.apache.qpid.framing.ProtocolVersion getProtocolVersion()
getProtocolVersion in interface org.apache.qpid.protocol.ProtocolVersionAwarepublic byte getProtocolMinorVersion()
getProtocolMinorVersion in interface org.apache.qpid.protocol.ProtocolVersionAwarepublic org.apache.qpid.framing.MethodRegistry getRegistry()
public VirtualHostImpl<?,?,?> getVirtualHost()
getVirtualHost in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>getVirtualHost in interface AMQProtocolSession<AMQProtocolEngine>public void setVirtualHost(VirtualHostImpl<?,?,?> virtualHost) throws org.apache.qpid.AMQException
setVirtualHost in interface AMQProtocolSession<AMQProtocolEngine>org.apache.qpid.AMQExceptionpublic void addDeleteTask(Action<? super AMQProtocolEngine> task)
addDeleteTask in interface Deletable<AMQProtocolEngine>public void removeDeleteTask(Action<? super AMQProtocolEngine> task)
removeDeleteTask in interface Deletable<AMQProtocolEngine>public ProtocolOutputConverter getProtocolOutputConverter()
getProtocolOutputConverter in interface AMQProtocolSession<AMQProtocolEngine>public void setAuthorizedSubject(Subject authorizedSubject)
setAuthorizedSubject in interface AMQProtocolSession<AMQProtocolEngine>public Subject getAuthorizedSubject()
getAuthorizedSubject in interface AuthorizationHolderpublic Principal getAuthorizedPrincipal()
getAuthorizedPrincipal in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>getAuthorizedPrincipal in interface AuthorizationHolderpublic SocketAddress getRemoteAddress()
getRemoteAddress in interface org.apache.qpid.protocol.ProtocolEnginegetRemoteAddress in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>getRemoteAddress in interface AMQProtocolSession<AMQProtocolEngine>public String getRemoteProcessPid()
getRemoteProcessPid in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public SocketAddress getLocalAddress()
AMQProtocolSessiongetLocalAddress in interface org.apache.qpid.protocol.ProtocolEnginegetLocalAddress in interface AMQProtocolSession<AMQProtocolEngine>public Principal getPeerPrincipal()
getPeerPrincipal in interface AMQProtocolSession<AMQProtocolEngine>public org.apache.qpid.framing.MethodRegistry getMethodRegistry()
getMethodRegistry in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSessiongetMethodRegistry in interface AMQProtocolSession<AMQProtocolEngine>public org.apache.qpid.framing.MethodDispatcher getMethodDispatcher()
getMethodDispatcher in interface AMQProtocolSession<AMQProtocolEngine>public void closed()
closed in interface org.apache.qpid.protocol.ProtocolEngineclosed in interface org.apache.qpid.transport.Receiver<ByteBuffer>public void readerIdle()
readerIdle in interface org.apache.qpid.protocol.ProtocolEnginereaderIdle in interface org.apache.qpid.transport.network.TransportActivitypublic void writerIdle()
writerIdle in interface org.apache.qpid.protocol.ProtocolEnginewriterIdle in interface org.apache.qpid.transport.network.TransportActivitypublic void exception(Throwable throwable)
exception in interface org.apache.qpid.transport.Receiver<ByteBuffer>public void setSender(org.apache.qpid.transport.Sender<ByteBuffer> sender)
setSender in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSessionpublic long getReadBytes()
getReadBytes in interface org.apache.qpid.protocol.ProtocolEnginepublic long getWrittenBytes()
getWrittenBytes in interface org.apache.qpid.protocol.ProtocolEnginegetWrittenBytes in interface AMQProtocolSession<AMQProtocolEngine>public long getLastIoTime()
getLastIoTime in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>getLastIoTime in interface AMQProtocolSession<AMQProtocolEngine>public Port<?> getPort()
getPort in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public Transport getTransport()
getTransport in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public void stop()
stop in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public boolean isStopped()
isStopped in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public String getVirtualHostName()
getVirtualHostName in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public long getLastReceivedTime()
getLastReceivedTime in interface AMQProtocolSession<AMQProtocolEngine>public String getClientVersion()
getClientVersion in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>getClientVersion in interface AMQProtocolSession<AMQProtocolEngine>public String getClientProduct()
getClientProduct in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public long getSessionCountLimit()
getSessionCountLimit in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public boolean isDurable()
public long getConnectionId()
getConnectionId in interface org.apache.qpid.protocol.ServerProtocolEnginegetConnectionId in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public String getAddress()
public void closeSession(AMQChannel<AMQProtocolEngine> session, org.apache.qpid.protocol.AMQConstant cause, String message)
closeSession in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public void close(org.apache.qpid.protocol.AMQConstant cause,
String message)
close in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public void block()
block in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public void unblock()
unblock in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public boolean isClosed()
public List<AMQChannel<AMQProtocolEngine>> getSessionModels()
getSessionModels in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public LogSubject getLogSubject()
getLogSubject in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public void registerMessageDelivered(long messageSize)
registerMessageDelivered in interface StatisticsGathererpublic void registerMessageReceived(long messageSize,
long timestamp)
registerMessageReceived in interface StatisticsGathererpublic StatisticsCounter getMessageReceiptStatistics()
getMessageReceiptStatistics in interface StatisticsGathererpublic StatisticsCounter getDataReceiptStatistics()
getDataReceiptStatistics in interface StatisticsGathererpublic StatisticsCounter getMessageDeliveryStatistics()
getMessageDeliveryStatistics in interface StatisticsGathererpublic StatisticsCounter getDataDeliveryStatistics()
getDataDeliveryStatistics in interface StatisticsGathererpublic void resetStatistics()
resetStatistics in interface StatisticsGathererpublic boolean isSessionNameUnique(byte[] name)
isSessionNameUnique in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public String getRemoteAddressString()
getRemoteAddressString in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public String getClientId()
getClientId in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public String getRemoteContainerName()
getRemoteContainerName in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public void addSessionListener(SessionModelListener listener)
addSessionListener in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public void removeSessionListener(SessionModelListener listener)
removeSessionListener in interface AMQConnectionModel<AMQProtocolEngine,AMQChannel<AMQProtocolEngine>>public void setDeferFlush(boolean deferFlush)
setDeferFlush in interface AMQProtocolSession<AMQProtocolEngine>public Object getReference()
getReference in interface AMQProtocolSession<AMQProtocolEngine>public Lock getReceivedLock()
getReceivedLock in interface AMQProtocolSession<AMQProtocolEngine>public long getLastReadTime()
getLastReadTime in interface org.apache.qpid.transport.network.TransportActivitypublic long getLastWriteTime()
getLastWriteTime in interface org.apache.qpid.transport.network.TransportActivitypublic boolean isCloseWhenNoRoute()
AMQProtocolSessionisCloseWhenNoRoute in interface AMQProtocolSession<AMQProtocolEngine>public boolean isCompressionSupported()
isCompressionSupported in interface AMQProtocolSession<AMQProtocolEngine>public int getMessageCompressionThreshold()
getMessageCompressionThreshold in interface AMQProtocolSession<AMQProtocolEngine>public EventLogger getEventLogger()
Copyright © 2006–2014 The Apache Software Foundation. All rights reserved.