public class AMQProtocolSession extends Object implements AMQVersionAwareProtocolSession
The underlying protocol session is still available but clients should not use it to obtain session attributes.
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
_logger |
static int |
MAX_CHANNEL_MAX |
static int |
MIN_USABLE_CHANNEL_NUM |
| Constructor and Description |
|---|
AMQProtocolSession(AMQProtocolHandler protocolHandler,
AMQConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
channelClosed(int channelId,
int code,
String text)
Called from the ChannelClose handler when a channel close frame is received.
|
void |
closeProtocolSession() |
void |
closeSession(AMQSession<?,?> session)
Starts the process of closing a session
|
void |
confirmConsumerCancelled(int channelId,
AMQShortString consumerTag) |
void |
contentBodyReceived(int channelId,
ContentBody contentBody) |
void |
contentHeaderReceived(int channelId,
ContentHeaderBody contentHeader) |
AMQConnection |
getAMQConnection() |
String |
getClientID() |
protected AMQConnection |
getConnection() |
ConnectionSettings |
getConnectionSettings() |
FieldTable |
getConnectionStartServerProperties() |
ConnectionTuneParameters |
getConnectionTuneParameters() |
MethodDispatcher |
getMethodDispatcher() |
FrameCreatingMethodProcessor |
getMethodProcessor() |
MethodRegistry |
getMethodRegistry()
Gets the method registry for a specific version of the AMQP.
|
ProtocolVersion |
getProtocolVersion() |
SaslClient |
getSaslClient() |
ByteBufferSender |
getSender() |
protected AMQSession |
getSession(int channelId) |
AMQStateManager |
getStateManager() |
String |
getVirtualHost() |
void |
heartbeatBodyReceived(int channelId,
HeartbeatBody body) |
void |
init(ConnectionSettings settings) |
void |
methodFrameReceived(int channel,
AMQMethodBody amqMethodBody) |
void |
notifyError(Exception error) |
void |
setClientID(String clientID) |
void |
setConnectionStartServerProperties(FieldTable serverProperties) |
void |
setFlowControl(int channelId,
boolean active) |
void |
setMaxFrameSize(long frameMax) |
void |
setProtocolVersion(ProtocolVersion pv) |
void |
setSaslClient(SaslClient client)
Store the SASL client currently being used for the authentication handshake
|
void |
setSender(ByteBufferSender sender) |
void |
setTicket(int ticket,
int channelId) |
String |
toString() |
void |
tuneConnection(ConnectionTuneParameters params) |
void |
unprocessedMessageReceived(int channelId,
UnprocessedMessage message)
Callback invoked from the BasicDeliverMethodHandler when a message has been received.
|
void |
writeFrame(AMQDataBlock frame)
Writes a frame to the wire, encoding it as necessary, for example, into a sequence of bytes.
|
protected static final org.slf4j.Logger _logger
public static final int MAX_CHANNEL_MAX
public static final int MIN_USABLE_CHANNEL_NUM
public AMQProtocolSession(AMQProtocolHandler protocolHandler, AMQConnection connection)
public void init(ConnectionSettings settings)
public ConnectionSettings getConnectionSettings()
public ConnectionTuneParameters getConnectionTuneParameters()
public void tuneConnection(ConnectionTuneParameters params)
public String getClientID()
public void setClientID(String clientID) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic AMQStateManager getStateManager()
public String getVirtualHost()
public SaslClient getSaslClient()
public void setSaslClient(SaslClient client)
client - if non-null, stores this in the session. if null clears any existing client being storedpublic void unprocessedMessageReceived(int channelId,
UnprocessedMessage message)
throws QpidException
QpidException - if this was not expectedpublic void contentHeaderReceived(int channelId,
ContentHeaderBody contentHeader)
throws QpidException
contentHeaderReceived in interface AMQVersionAwareProtocolSessionQpidExceptionpublic void contentBodyReceived(int channelId,
ContentBody contentBody)
throws QpidException
contentBodyReceived in interface AMQVersionAwareProtocolSessionQpidExceptionpublic void heartbeatBodyReceived(int channelId,
HeartbeatBody body)
throws QpidException
heartbeatBodyReceived in interface AMQVersionAwareProtocolSessionQpidExceptionprotected AMQSession getSession(int channelId)
public void writeFrame(AMQDataBlock frame)
AMQProtocolWriterwriteFrame in interface AMQProtocolWriterframe - The frame to be encoded and written.public void closeSession(AMQSession<?,?> session)
session - the AMQSession being closedpublic boolean channelClosed(int channelId,
int code,
String text)
throws QpidException
channelId - the id of the channel (session)QpidExceptionpublic AMQConnection getAMQConnection()
public void closeProtocolSession()
throws QpidException
QpidExceptionpublic ByteBufferSender getSender()
public void confirmConsumerCancelled(int channelId,
AMQShortString consumerTag)
public void setProtocolVersion(ProtocolVersion pv)
public ProtocolVersion getProtocolVersion()
getProtocolVersion in interface ProtocolVersionAwarepublic MethodRegistry getMethodRegistry()
AMQVersionAwareProtocolSessiongetMethodRegistry in interface AMQVersionAwareProtocolSessionpublic MethodDispatcher getMethodDispatcher()
public void setTicket(int ticket,
int channelId)
public void setFlowControl(int channelId,
boolean active)
public void methodFrameReceived(int channel,
AMQMethodBody amqMethodBody)
throws QpidException
methodFrameReceived in interface AMQVersionAwareProtocolSessionQpidExceptionpublic void notifyError(Exception error)
public void setSender(ByteBufferSender sender)
setSender in interface AMQVersionAwareProtocolSessionprotected AMQConnection getConnection()
public void setConnectionStartServerProperties(FieldTable serverProperties)
public FieldTable getConnectionStartServerProperties()
public void setMaxFrameSize(long frameMax)
public FrameCreatingMethodProcessor getMethodProcessor()
Copyright © 2006–2018 The Apache Software Foundation. All rights reserved.