|
||||||||||
| 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
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.qpid.server.protocol.AMQProtocolSession |
|---|
AMQProtocolSession.Task |
| 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,
VirtualHostRegistry virtualHostRegistry,
AMQCodecFactory codecFactory)
|
|
AMQMinaProtocolSession(org.apache.mina.common.IoSession session,
VirtualHostRegistry virtualHostRegistry,
AMQCodecFactory codecFactory,
AMQStateManager stateManager)
|
|
| 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 |
closeSession()
This must be called when the session is _closed in order to free up any resources managed by the session. |
void |
commitTransactions(AMQChannel channel)
|
void |
dataBlockReceived(AMQDataBlock message)
Called when a protocol data block is received |
java.lang.String |
dump()
|
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.util.List<AMQChannel> |
getChannels()
|
java.lang.Object |
getClientIdentifier()
|
FieldTable |
getClientProperties()
|
AMQShortString |
getContextKey()
Get the context key associated with this session. |
org.apache.mina.common.IoSession |
getIOSession()
|
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()
|
java.lang.Long |
getMaximumNumberOfChannels()
|
byte |
getProtocolMajorVersion()
|
byte |
getProtocolMinorVersion()
|
VersionSpecificRegistry |
getRegistry()
|
javax.security.sasl.SaslServer |
getSaslServer()
|
VirtualHost |
getVirtualHost()
|
void |
initHeartbeats(int delay)
Initialise heartbeats on the session. |
boolean |
isProtocolVersion(byte major,
byte minor)
|
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 |
setClientProperties(FieldTable clientProperties)
|
void |
setContextKey(AMQShortString contextKey)
Set the context key associated with this session. |
void |
setMaximumNumberOfChannels(java.lang.Long value)
|
void |
setSaslServer(javax.security.sasl.SaslServer saslServer)
Set the sasl server that is to perform authentication for this session. |
void |
setVirtualHost(VirtualHost virtualHost)
|
java.lang.String |
toString()
|
void |
writeFrame(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,
VirtualHostRegistry virtualHostRegistry,
AMQCodecFactory codecFactory)
throws AMQException
AMQException
public AMQMinaProtocolSession(org.apache.mina.common.IoSession session,
VirtualHostRegistry virtualHostRegistry,
AMQCodecFactory codecFactory,
AMQStateManager stateManager)
throws AMQException
AMQException| Method Detail |
|---|
public ManagedObject getManagedObject()
getManagedObject in interface Managablepublic org.apache.mina.common.IoSession getIOSession()
public static AMQProtocolSession getAMQProtocolSession(org.apache.mina.common.IoSession minaProtocolSession)
public void dataBlockReceived(AMQDataBlock message)
throws java.lang.Exception
AMQProtocolSession
dataBlockReceived in interface AMQProtocolSessionmessage - the data block that has been received
java.lang.Exception - if processing the datablock failspublic void writeFrame(AMQDataBlock frame)
writeFrame in interface AMQProtocolWriterframe - the frame to writepublic AMQShortString getContextKey()
AMQProtocolSession
getContextKey in interface AMQProtocolSessionpublic void setContextKey(AMQShortString contextKey)
AMQProtocolSession
setContextKey in interface AMQProtocolSessioncontextKey - the context keypublic java.util.List<AMQChannel> getChannels()
public AMQChannel getChannel(int channelId)
throws AMQException
AMQProtocolSession
getChannel in interface AMQProtocolSessionchannelId - the channel id which must be valid
AMQExceptionpublic boolean channelAwaitingClosure(int channelId)
AMQProtocolSession
channelAwaitingClosure in interface AMQProtocolSessionchannelId - id to check
public void addChannel(AMQChannel channel)
throws AMQException
AMQProtocolSession
addChannel in interface AMQProtocolSessionchannel - 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.
AMQExceptionpublic java.lang.Long getMaximumNumberOfChannels()
public void setMaximumNumberOfChannels(java.lang.Long value)
public void commitTransactions(AMQChannel channel)
throws AMQException
AMQException
public void rollbackTransactions(AMQChannel channel)
throws AMQException
AMQException
public void closeChannel(int channelId)
throws AMQException
closeChannel in interface AMQProtocolSessionchannelId - id of the channel to close
AMQException - if an error occurs closing the channel
java.lang.IllegalArgumentException - if the channel id is not validpublic void closeChannelOk(int channelId)
AMQProtocolSession
closeChannelOk in interface AMQProtocolSessionchannelId - id of the channel to closepublic void removeChannel(int channelId)
removeChannel in interface AMQProtocolSessionchannelId - public void initHeartbeats(int delay)
initHeartbeats in interface AMQProtocolSessiondelay - delay in seconds (not ms)
public void closeSession()
throws AMQException
closeSession in interface AMQProtocolSessionAMQExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String dump()
public java.lang.Object getKey()
getKey in interface AMQProtocolSessionpublic java.lang.String getLocalFQDN()
getLocalFQDN in interface AMQProtocolSessionpublic javax.security.sasl.SaslServer getSaslServer()
getSaslServer in interface AMQProtocolSessionpublic void setSaslServer(javax.security.sasl.SaslServer saslServer)
AMQProtocolSession
setSaslServer in interface AMQProtocolSessionpublic FieldTable getClientProperties()
getClientProperties in interface AMQProtocolSessionpublic void setClientProperties(FieldTable clientProperties)
setClientProperties in interface AMQProtocolSessionpublic byte getProtocolMajorVersion()
getProtocolMajorVersion in interface ProtocolVersionAwarepublic byte getProtocolMinorVersion()
getProtocolMinorVersion in interface ProtocolVersionAware
public boolean isProtocolVersion(byte major,
byte minor)
public VersionSpecificRegistry getRegistry()
getRegistry in interface AMQVersionAwareProtocolSessionpublic java.lang.Object getClientIdentifier()
getClientIdentifier in interface AMQProtocolSessionpublic VirtualHost getVirtualHost()
getVirtualHost in interface AMQProtocolSession
public void setVirtualHost(VirtualHost virtualHost)
throws AMQException
setVirtualHost in interface AMQProtocolSessionAMQExceptionpublic void addSessionCloseTask(AMQProtocolSession.Task task)
addSessionCloseTask in interface AMQProtocolSessionpublic void removeSessionCloseTask(AMQProtocolSession.Task task)
removeSessionCloseTask in interface AMQProtocolSession
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||