|
||||||||||
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 Managable
public 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 AMQProtocolSession
message
- the data block that has been received
java.lang.Exception
- if processing the datablock failspublic void writeFrame(AMQDataBlock frame)
writeFrame
in interface AMQProtocolWriter
frame
- the frame to writepublic AMQShortString getContextKey()
AMQProtocolSession
getContextKey
in interface AMQProtocolSession
public void setContextKey(AMQShortString contextKey)
AMQProtocolSession
setContextKey
in interface AMQProtocolSession
contextKey
- the context keypublic java.util.List<AMQChannel> getChannels()
public AMQChannel getChannel(int channelId) throws AMQException
AMQProtocolSession
getChannel
in interface AMQProtocolSession
channelId
- the channel id which must be valid
AMQException
public boolean channelAwaitingClosure(int channelId)
AMQProtocolSession
channelAwaitingClosure
in interface AMQProtocolSession
channelId
- id to check
public void addChannel(AMQChannel channel) throws 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.
AMQException
public 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 AMQProtocolSession
channelId
- 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 AMQProtocolSession
channelId
- id of the channel to closepublic 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 AMQException
closeSession
in interface AMQProtocolSession
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 FieldTable getClientProperties()
getClientProperties
in interface AMQProtocolSession
public void setClientProperties(FieldTable clientProperties)
setClientProperties
in interface AMQProtocolSession
public byte getProtocolMajorVersion()
getProtocolMajorVersion
in interface ProtocolVersionAware
public byte getProtocolMinorVersion()
getProtocolMinorVersion
in interface ProtocolVersionAware
public boolean isProtocolVersion(byte major, byte minor)
public VersionSpecificRegistry getRegistry()
getRegistry
in interface AMQVersionAwareProtocolSession
public java.lang.Object getClientIdentifier()
getClientIdentifier
in interface AMQProtocolSession
public VirtualHost getVirtualHost()
getVirtualHost
in interface AMQProtocolSession
public void setVirtualHost(VirtualHost virtualHost) throws AMQException
setVirtualHost
in interface AMQProtocolSession
AMQException
public void addSessionCloseTask(AMQProtocolSession.Task task)
addSessionCloseTask
in interface AMQProtocolSession
public 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 |