|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.server.protocol.AMQMinaProtocolSession
public class AMQMinaProtocolSession
Field Summary |
---|
Fields inherited from interface org.apache.qpid.framing.ProtocolVersionList |
---|
PROTOCOL_MAJOR, PROTOCOL_MINOR, pv |
Constructor Summary | |
---|---|
AMQMinaProtocolSession(org.apache.mina.common.IoSession session,
QueueRegistry queueRegistry,
ExchangeRegistry exchangeRegistry,
org.apache.qpid.codec.AMQCodecFactory codecFactory)
|
|
AMQMinaProtocolSession(org.apache.mina.common.IoSession session,
QueueRegistry queueRegistry,
ExchangeRegistry exchangeRegistry,
org.apache.qpid.codec.AMQCodecFactory codecFactory,
AMQStateManager stateManager)
|
Method Summary | |
---|---|
void |
addChannel(AMQChannel channel)
Associate a channel with this session. |
boolean |
amqpVersionEquals(byte major,
byte minor)
|
void |
closeChannel(int channelId)
Close a specific channel. |
void |
closeSession()
This must be called when the session is _closed in order to free up any resources managed by the session. |
void |
dataBlockReceived(org.apache.qpid.framing.AMQDataBlock message)
Called when a protocol data block is received |
java.lang.String |
dump()
|
byte |
getAmqpMajor()
Convenience methods for managing AMQP version. |
byte |
getAmqpMinor()
|
static AMQProtocolSession |
getAMQProtocolSession(org.apache.mina.common.IoSession minaProtocolSession)
|
AMQChannel |
getChannel(int channelId)
Get the channel for this session associated with the specified id. |
java.lang.String |
getContextKey()
Get the context key associated with this session. |
java.lang.Object |
getKey()
|
java.lang.String |
getLocalFQDN()
Get the fully qualified domain name of the local address to which this session is bound. |
ManagedObject |
getManagedObject()
|
javax.security.sasl.SaslServer |
getSaslServer()
|
void |
initHeartbeats(int delay)
Initialise heartbeats on the session. |
void |
removeChannel(int channelId)
In our current implementation this is used by the clustering code. |
void |
setContextKey(java.lang.String contextKey)
Set the context key associated with this session. |
void |
setSaslServer(javax.security.sasl.SaslServer saslServer)
Set the sasl server that is to perform authentication for this session. |
java.lang.String |
toString()
|
void |
writeFrame(org.apache.qpid.framing.AMQDataBlock frame)
Convenience method that writes a frame to the protocol session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AMQMinaProtocolSession(org.apache.mina.common.IoSession session, QueueRegistry queueRegistry, ExchangeRegistry exchangeRegistry, org.apache.qpid.codec.AMQCodecFactory codecFactory) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
public AMQMinaProtocolSession(org.apache.mina.common.IoSession session, QueueRegistry queueRegistry, ExchangeRegistry exchangeRegistry, org.apache.qpid.codec.AMQCodecFactory codecFactory, AMQStateManager stateManager) throws org.apache.qpid.AMQException
org.apache.qpid.AMQException
Method Detail |
---|
public ManagedObject getManagedObject()
getManagedObject
in interface Managable
public static AMQProtocolSession getAMQProtocolSession(org.apache.mina.common.IoSession minaProtocolSession)
public void dataBlockReceived(org.apache.qpid.framing.AMQDataBlock message) throws java.lang.Exception
AMQProtocolSession
dataBlockReceived
in interface AMQProtocolSession
message
- the data block that has been received
java.lang.Exception
- if processing the datablock failspublic void writeFrame(org.apache.qpid.framing.AMQDataBlock frame)
writeFrame
in interface AMQProtocolSession
frame
- the frame to writepublic java.lang.String getContextKey()
AMQProtocolSession
getContextKey
in interface AMQProtocolSession
public void setContextKey(java.lang.String contextKey)
AMQProtocolSession
setContextKey
in interface AMQProtocolSession
contextKey
- the context keypublic AMQChannel getChannel(int channelId) throws org.apache.qpid.AMQException
AMQProtocolSession
getChannel
in interface AMQProtocolSession
channelId
- the channel id which must be valid
org.apache.qpid.AMQException
public void addChannel(AMQChannel channel)
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.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
java.lang.IllegalArgumentException
- if the channel id is not validpublic void removeChannel(int channelId)
removeChannel
in interface AMQProtocolSession
channelId
- public 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 java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String dump()
public java.lang.Object getKey()
getKey
in interface AMQProtocolSession
public java.lang.String getLocalFQDN()
getLocalFQDN
in interface AMQProtocolSession
public javax.security.sasl.SaslServer getSaslServer()
getSaslServer
in interface AMQProtocolSession
public void setSaslServer(javax.security.sasl.SaslServer saslServer)
AMQProtocolSession
setSaslServer
in interface AMQProtocolSession
public byte getAmqpMajor()
public byte getAmqpMinor()
public boolean amqpVersionEquals(byte major, byte minor)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |