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) |
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.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 AMQException
message - AMQException - if this was not expectedpublic void contentHeaderReceived(int channelId,
ContentHeaderBody contentHeader)
throws AMQException
contentHeaderReceived in interface AMQVersionAwareProtocolSessionAMQExceptionpublic void contentBodyReceived(int channelId,
ContentBody contentBody)
throws AMQException
contentBodyReceived in interface AMQVersionAwareProtocolSessionAMQExceptionpublic void heartbeatBodyReceived(int channelId,
HeartbeatBody body)
throws AMQException
heartbeatBodyReceived in interface AMQVersionAwareProtocolSessionAMQExceptionprotected AMQSession getSession(int channelId)
public void writeFrame(AMQDataBlock frame)
writeFrame in interface AMQProtocolWriterpublic void closeSession(AMQSession session)
session - the AMQSession being closedpublic boolean channelClosed(int channelId,
AMQConstant code,
String text)
throws AMQException
channelId - the id of the channel (session)AMQExceptionpublic AMQConnection getAMQConnection()
public void closeProtocolSession()
throws AMQException
AMQExceptionpublic Sender<ByteBuffer> getSender()
public void failover(String host, int port)
protected AMQShortString generateQueueName()
public void confirmConsumerCancelled(int channelId,
AMQShortString consumerTag)
public void setProtocolVersion(ProtocolVersion pv)
public byte getProtocolMinorVersion()
getProtocolMinorVersion in interface ProtocolVersionAwarepublic byte getProtocolMajorVersion()
getProtocolMajorVersion in interface ProtocolVersionAwarepublic ProtocolVersion getProtocolVersion()
getProtocolVersion in interface ProtocolVersionAwarepublic MethodRegistry getMethodRegistry()
getMethodRegistry in interface AMQVersionAwareProtocolSessionpublic MethodDispatcher getMethodDispatcher()
public void setTicket(int ticket,
int channelId)
public void setMethodDispatcher(MethodDispatcher methodDispatcher)
public void setFlowControl(int channelId,
boolean active)
public void methodFrameReceived(int channel,
AMQMethodBody amqMethodBody)
throws AMQException
methodFrameReceived in interface AMQVersionAwareProtocolSessionAMQExceptionpublic void notifyError(Exception error)
public void setSender(Sender<ByteBuffer> sender)
setSender in interface AMQVersionAwareProtocolSessionprotected AMQProtocolHandler getProtocolHandler()
protected ConcurrentMap<Integer,AMQSession> getChannelId2SessionMap()
protected void setChannelId2SessionMap(ConcurrentMap<Integer,AMQSession> channelId2SessionMap)
protected ConcurrentMap getClosingChannels()
protected void setClosingChannels(ConcurrentMap closingChannels)
protected int getQueueId()
protected void setQueueId(int queueId)
protected Object getQueueIdLock()
protected AMQConnection getConnection()
public void setConnectionStartServerProperties(FieldTable serverProperties)
public FieldTable getConnectionStartServerProperties()
public void setMaxFrameSize(long frameMax)
public FrameCreatingMethodProcessor getMethodProcessor()
Copyright © 2006–2015 The Apache Software Foundation. All rights reserved.