|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.server.protocol.AMQProtocolEngine
public class AMQProtocolEngine
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.qpid.server.protocol.AMQProtocolSession |
---|
AMQProtocolSession.ProtocolSessionIdentifier, AMQProtocolSession.Task |
Field Summary | |
---|---|
protected boolean |
_closed
|
Constructor Summary | |
---|---|
AMQProtocolEngine(VirtualHostRegistry virtualHostRegistry,
org.apache.qpid.transport.NetworkDriver driver)
|
Method Summary | |
---|---|
void |
addChannel(AMQChannel channel)
Associate a channel with this session. |
void |
addSessionCloseTask(AMQProtocolSession.Task task)
|
boolean |
channelAwaitingClosure(int channelId)
Check to see if this chanel is closing |
void |
closeChannel(int channelId)
Close a specific channel. |
void |
closeChannelOk(int channelId)
Markes the specific channel as closed. |
void |
closeConnection(int channelId,
org.apache.qpid.AMQConnectionException e,
boolean closeProtocolSession)
This must be called to close the session in order to free up any resources managed by the session. |
void |
closed()
|
void |
closeIfLingeringClosedChannels()
|
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(AMQSessionModel session,
org.apache.qpid.protocol.AMQConstant cause,
String message)
Close the given requested Session |
void |
commitTransactions(AMQChannel channel)
|
void |
contentBodyReceived(int channelId,
org.apache.qpid.framing.ContentBody body)
|
void |
contentHeaderReceived(int channelId,
org.apache.qpid.framing.ContentHeaderBody body)
|
void |
dataBlockReceived(org.apache.qpid.framing.AMQDataBlock message)
Called when a protocol data block is received |
String |
dump()
|
void |
exception(Throwable throwable)
|
String |
getAddress()
|
AMQChannel |
getAndAssertChannel(int channelId)
|
String |
getAuthId()
|
Principal |
getAuthorizedID()
|
AMQChannel |
getChannel(int channelId)
Get the channel for this session associated with the specified id. |
List<AMQChannel> |
getChannels()
|
String |
getClientID()
|
Object |
getClientIdentifier()
|
org.apache.qpid.framing.FieldTable |
getClientProperties()
|
String |
getClientVersion()
|
ConfigStore |
getConfigStore()
|
ConnectionConfigType |
getConfigType()
|
long |
getConnectionId()
|
org.apache.qpid.framing.AMQShortString |
getContextKey()
Get the context key associated with this session. |
long |
getCreateTime()
|
UUID |
getId()
|
Object |
getKey()
|
long |
getLastIoTime()
|
SocketAddress |
getLocalAddress()
|
String |
getLocalFQDN()
Get the fully qualified domain name of the local address to which this session is bound. |
LogActor |
getLogActor()
|
ManagedObject |
getManagedObject()
|
long |
getMaxFrameSize()
|
Long |
getMaximumNumberOfChannels()
|
org.apache.qpid.framing.MethodDispatcher |
getMethodDispatcher()
|
org.apache.qpid.framing.MethodRegistry |
getMethodRegistry()
|
ConfiguredObject |
getParent()
|
Principal |
getPrincipal()
|
byte |
getProtocolMajorVersion()
|
byte |
getProtocolMinorVersion()
|
ProtocolOutputConverter |
getProtocolOutputConverter()
|
org.apache.qpid.framing.ProtocolVersion |
getProtocolVersion()
|
long |
getReadBytes()
|
org.apache.qpid.framing.MethodRegistry |
getRegistry()
|
SocketAddress |
getRemoteAddress()
|
Integer |
getRemoteParentPID()
|
Integer |
getRemotePID()
|
String |
getRemoteProcessName()
|
SaslServer |
getSaslServer()
|
long |
getSessionID()
|
AMQProtocolSession.ProtocolSessionIdentifier |
getSessionIdentifier()
|
VirtualHost |
getVirtualHost()
|
long |
getWrittenBytes()
|
void |
heartbeatBodyReceived(int channelId,
org.apache.qpid.framing.HeartbeatBody body)
|
void |
init()
|
void |
initHeartbeats(int delay)
Initialise heartbeats on the session. |
boolean |
isClosing()
|
boolean |
isDurable()
|
Boolean |
isFederationLink()
|
Boolean |
isIncoming()
|
boolean |
isProtocolVersion(byte major,
byte minor)
|
Boolean |
isShadow()
|
Boolean |
isSystemConnection()
|
void |
methodFrameReceived(int channelId,
org.apache.qpid.framing.AMQMethodBody methodBody)
|
void |
mgmtClose()
|
void |
mgmtCloseChannel(int channelId)
|
void |
readerIdle()
|
void |
received(ByteBuffer msg)
|
void |
removeChannel(int channelId)
In our current implementation this is used by the clustering code. |
void |
removeSessionCloseTask(AMQProtocolSession.Task task)
|
void |
rollbackTransactions(AMQChannel channel)
|
void |
setAuthorizedID(Principal authorizedID)
|
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 |
setMaxFrameSize(long frameMax)
|
void |
setMaximumNumberOfChannels(Long value)
|
void |
setNetworkDriver(org.apache.qpid.transport.NetworkDriver driver)
|
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(VirtualHost virtualHost)
|
String |
toString()
|
void |
writeFrame(org.apache.qpid.framing.AMQDataBlock frame)
Convenience method that writes a frame to the protocol session. |
void |
writerIdle()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected volatile boolean _closed
Constructor Detail |
---|
public AMQProtocolEngine(VirtualHostRegistry virtualHostRegistry, org.apache.qpid.transport.NetworkDriver driver)
Method Detail |
---|
public ManagedObject getManagedObject()
getManagedObject
in interface Managable
public long getSessionID()
getSessionID
in interface AMQProtocolSession
public LogActor getLogActor()
getLogActor
in interface AMQProtocolSession
public void setMaxFrameSize(long frameMax)
setMaxFrameSize
in interface AMQProtocolSession
public long getMaxFrameSize()
getMaxFrameSize
in interface AMQProtocolSession
public boolean isClosing()
isClosing
in interface AMQProtocolSession
public void received(ByteBuffer msg)
received
in interface org.apache.qpid.transport.Receiver<ByteBuffer>
public void dataBlockReceived(org.apache.qpid.framing.AMQDataBlock message) throws Exception
AMQProtocolSession
dataBlockReceived
in interface AMQProtocolSession
message
- the data block that has been received
Exception
- if processing the datablock failspublic void methodFrameReceived(int channelId, org.apache.qpid.framing.AMQMethodBody methodBody)
methodFrameReceived
in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSession
public void contentHeaderReceived(int channelId, org.apache.qpid.framing.ContentHeaderBody body) throws org.apache.qpid.AMQException
contentHeaderReceived
in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSession
org.apache.qpid.AMQException
public void contentBodyReceived(int channelId, org.apache.qpid.framing.ContentBody body) throws org.apache.qpid.AMQException
contentBodyReceived
in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSession
org.apache.qpid.AMQException
public void heartbeatBodyReceived(int channelId, org.apache.qpid.framing.HeartbeatBody body)
heartbeatBodyReceived
in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSession
public void writeFrame(org.apache.qpid.framing.AMQDataBlock frame)
writeFrame
in interface org.apache.qpid.protocol.AMQProtocolWriter
frame
- the frame to writepublic org.apache.qpid.framing.AMQShortString getContextKey()
AMQProtocolSession
getContextKey
in interface AMQProtocolSession
public void setContextKey(org.apache.qpid.framing.AMQShortString contextKey)
AMQProtocolSession
setContextKey
in interface AMQProtocolSession
contextKey
- the context keypublic List<AMQChannel> getChannels()
getChannels
in interface AMQProtocolSession
public AMQChannel getAndAssertChannel(int channelId) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public AMQChannel getChannel(int channelId)
AMQProtocolSession
getChannel
in interface AMQProtocolSession
channelId
- the channel id which must be valid
public boolean channelAwaitingClosure(int channelId)
AMQProtocolSession
channelAwaitingClosure
in interface AMQProtocolSession
channelId
- id to check
public void addChannel(AMQChannel channel) throws org.apache.qpid.AMQException
AMQProtocolSession
addChannel
in interface AMQProtocolSession
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.AMQException
public Long getMaximumNumberOfChannels()
getMaximumNumberOfChannels
in interface AMQProtocolSession
public void setMaximumNumberOfChannels(Long value)
setMaximumNumberOfChannels
in interface AMQProtocolSession
public void commitTransactions(AMQChannel channel) throws org.apache.qpid.AMQException
commitTransactions
in interface AMQProtocolSession
org.apache.qpid.AMQException
public void rollbackTransactions(AMQChannel channel) throws org.apache.qpid.AMQException
rollbackTransactions
in interface AMQProtocolSession
org.apache.qpid.AMQException
public void closeChannel(int channelId) throws org.apache.qpid.AMQException
closeChannel
in interface AMQProtocolSession
channelId
- id of the channel to close
org.apache.qpid.AMQException
- if an error occurs closing the channel
IllegalArgumentException
- if the channel id is not validpublic void closeChannelOk(int channelId)
AMQProtocolSession
closeChannelOk
in interface AMQProtocolSession
channelId
- id of the channel to closepublic void removeChannel(int channelId)
removeChannel
in interface AMQProtocolSession
channelId
- The channel to removepublic void initHeartbeats(int delay)
initHeartbeats
in interface AMQProtocolSession
delay
- delay in seconds (not ms)public void closeSession() throws org.apache.qpid.AMQException
closeSession
in interface AMQProtocolSession
org.apache.qpid.AMQException
public void closeConnection(int channelId, org.apache.qpid.AMQConnectionException e, boolean closeProtocolSession) throws org.apache.qpid.AMQException
AMQProtocolSession
closeConnection
in interface AMQProtocolSession
org.apache.qpid.AMQException
public void closeProtocolSession()
public String toString()
toString
in class Object
public String dump()
public Object getKey()
getKey
in interface AMQProtocolSession
public String getLocalFQDN()
getLocalFQDN
in interface AMQProtocolSession
public SaslServer getSaslServer()
getSaslServer
in interface AMQProtocolSession
public void setSaslServer(SaslServer saslServer)
AMQProtocolSession
setSaslServer
in interface AMQProtocolSession
public org.apache.qpid.framing.FieldTable getClientProperties()
getClientProperties
in interface AMQProtocolSession
public void setClientProperties(org.apache.qpid.framing.FieldTable clientProperties)
setClientProperties
in interface AMQProtocolSession
public byte getProtocolMajorVersion()
getProtocolMajorVersion
in interface org.apache.qpid.protocol.ProtocolVersionAware
public org.apache.qpid.framing.ProtocolVersion getProtocolVersion()
getProtocolVersion
in interface org.apache.qpid.protocol.ProtocolVersionAware
public byte getProtocolMinorVersion()
getProtocolMinorVersion
in interface org.apache.qpid.protocol.ProtocolVersionAware
public boolean isProtocolVersion(byte major, byte minor)
public org.apache.qpid.framing.MethodRegistry getRegistry()
public Object getClientIdentifier()
getClientIdentifier
in interface AMQProtocolSession
public VirtualHost getVirtualHost()
getVirtualHost
in interface ConnectionConfig
getVirtualHost
in interface AMQProtocolSession
public void setVirtualHost(VirtualHost virtualHost) throws org.apache.qpid.AMQException
setVirtualHost
in interface AMQProtocolSession
org.apache.qpid.AMQException
public void addSessionCloseTask(AMQProtocolSession.Task task)
addSessionCloseTask
in interface AMQProtocolSession
public void removeSessionCloseTask(AMQProtocolSession.Task task)
removeSessionCloseTask
in interface AMQProtocolSession
public ProtocolOutputConverter getProtocolOutputConverter()
getProtocolOutputConverter
in interface AMQProtocolSession
public void setAuthorizedID(Principal authorizedID)
setAuthorizedID
in interface AMQProtocolSession
public Principal getAuthorizedID()
public Principal getPrincipal()
getPrincipal
in interface PrincipalHolder
public SocketAddress getRemoteAddress()
getRemoteAddress
in interface org.apache.qpid.protocol.ProtocolEngine
getRemoteAddress
in interface AMQProtocolSession
public SocketAddress getLocalAddress()
getLocalAddress
in interface org.apache.qpid.protocol.ProtocolEngine
public org.apache.qpid.framing.MethodRegistry getMethodRegistry()
getMethodRegistry
in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSession
getMethodRegistry
in interface AMQProtocolSession
public org.apache.qpid.framing.MethodDispatcher getMethodDispatcher()
getMethodDispatcher
in interface AMQProtocolSession
public void closed()
closed
in interface org.apache.qpid.protocol.ProtocolEngine
closed
in interface org.apache.qpid.transport.Receiver<ByteBuffer>
public void readerIdle()
readerIdle
in interface org.apache.qpid.protocol.ProtocolEngine
public void setNetworkDriver(org.apache.qpid.transport.NetworkDriver driver)
setNetworkDriver
in interface org.apache.qpid.protocol.ProtocolEngine
public void writerIdle()
writerIdle
in interface org.apache.qpid.protocol.ProtocolEngine
public void exception(Throwable throwable)
exception
in interface org.apache.qpid.transport.Receiver<ByteBuffer>
public void init()
init
in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSession
public void setSender(org.apache.qpid.transport.Sender<ByteBuffer> sender)
setSender
in interface org.apache.qpid.protocol.AMQVersionAwareProtocolSession
public long getReadBytes()
getReadBytes
in interface org.apache.qpid.protocol.ProtocolEngine
public long getWrittenBytes()
getWrittenBytes
in interface org.apache.qpid.protocol.ProtocolEngine
getWrittenBytes
in interface AMQProtocolSession
public long getLastIoTime()
getLastIoTime
in interface AMQProtocolSession
public AMQProtocolSession.ProtocolSessionIdentifier getSessionIdentifier()
getSessionIdentifier
in interface AMQProtocolSession
public String getClientVersion()
getClientVersion
in interface AMQProtocolSession
public void closeIfLingeringClosedChannels()
closeIfLingeringClosedChannels
in interface AMQProtocolSession
public Boolean isIncoming()
isIncoming
in interface ConnectionConfig
public Boolean isSystemConnection()
isSystemConnection
in interface ConnectionConfig
public Boolean isFederationLink()
isFederationLink
in interface ConnectionConfig
public String getAuthId()
getAuthId
in interface ConnectionConfig
public Integer getRemotePID()
getRemotePID
in interface ConnectionConfig
public String getRemoteProcessName()
getRemoteProcessName
in interface ConnectionConfig
public Integer getRemoteParentPID()
getRemoteParentPID
in interface ConnectionConfig
public ConfigStore getConfigStore()
getConfigStore
in interface ConnectionConfig
public ConnectionConfigType getConfigType()
getConfigType
in interface ConfiguredObject<ConnectionConfigType,ConnectionConfig>
public ConfiguredObject getParent()
getParent
in interface ConfiguredObject<ConnectionConfigType,ConnectionConfig>
public boolean isDurable()
isDurable
in interface ConfiguredObject<ConnectionConfigType,ConnectionConfig>
public UUID getId()
getId
in interface ConfiguredObject<ConnectionConfigType,ConnectionConfig>
public long getConnectionId()
getConnectionId
in interface AMQConnectionModel
public String getAddress()
getAddress
in interface ConnectionConfig
public long getCreateTime()
getCreateTime
in interface ConfiguredObject<ConnectionConfigType,ConnectionConfig>
public Boolean isShadow()
isShadow
in interface ConnectionConfig
public void mgmtClose()
mgmtClose
in interface ConnectionConfig
public void mgmtCloseChannel(int channelId)
mgmtCloseChannel
in interface AMQProtocolSession
public String getClientID()
public void closeSession(AMQSessionModel session, org.apache.qpid.protocol.AMQConstant cause, String message) throws org.apache.qpid.AMQException
AMQConnectionModel
closeSession
in interface AMQConnectionModel
org.apache.qpid.AMQException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |