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,
AMQConstant 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() |
FieldTable |
getConnectionStartServerProperties() |
ConnectionTuneParameters |
getConnectionTuneParameters() |
MethodDispatcher |
getMethodDispatcher() |
FrameCreatingMethodProcessor |
getMethodProcessor() |
MethodRegistry |
getMethodRegistry()
Gets the method registry for a specific version of the AMQP.
|
protected AMQProtocolHandler |
getProtocolHandler()
The handler from which this session was created and which is used to handle protocol events.
|
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 ConnectionTuneParameters getConnectionTuneParameters()
public void tuneConnection(ConnectionTuneParameters params)
public String getClientID()
public void setClientID(String clientID) throws javax.jms.JMSException
javax.jms.JMSException
public 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 AMQVersionAwareProtocolSession
QpidException
public void contentBodyReceived(int channelId, ContentBody contentBody) throws QpidException
contentBodyReceived
in interface AMQVersionAwareProtocolSession
QpidException
public void heartbeatBodyReceived(int channelId, HeartbeatBody body) throws QpidException
heartbeatBodyReceived
in interface AMQVersionAwareProtocolSession
QpidException
protected AMQSession getSession(int channelId)
public void writeFrame(AMQDataBlock frame)
AMQProtocolWriter
writeFrame
in interface AMQProtocolWriter
frame
- The frame to be encoded and written.public void closeSession(AMQSession<?,?> session)
session
- the AMQSession being closedpublic boolean channelClosed(int channelId, AMQConstant code, String text) throws QpidException
channelId
- the id of the channel (session)QpidException
public AMQConnection getAMQConnection()
public void closeProtocolSession() throws QpidException
QpidException
public ByteBufferSender getSender()
public void confirmConsumerCancelled(int channelId, AMQShortString consumerTag)
public void setProtocolVersion(ProtocolVersion pv)
public ProtocolVersion getProtocolVersion()
getProtocolVersion
in interface ProtocolVersionAware
public MethodRegistry getMethodRegistry()
AMQVersionAwareProtocolSession
getMethodRegistry
in interface AMQVersionAwareProtocolSession
public 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 AMQVersionAwareProtocolSession
QpidException
public void notifyError(Exception error)
public void setSender(ByteBufferSender sender)
setSender
in interface AMQVersionAwareProtocolSession
protected AMQProtocolHandler getProtocolHandler()
protected AMQConnection getConnection()
public void setConnectionStartServerProperties(FieldTable serverProperties)
public FieldTable getConnectionStartServerProperties()
public void setMaxFrameSize(long frameMax)
public FrameCreatingMethodProcessor getMethodProcessor()
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.