public class AmqpSession extends Object implements AmqpResource
Constructor and Description |
---|
AmqpSession(AmqpConnection connection,
SessionId sessionId,
org.apache.qpid.proton.engine.Session session)
Create new AmqpSession instance whose parent is the given AmqpConnection.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Request from the remote peer to close this resource.
|
void |
commit(LocalTransactionId txId)
Commits all pending work for all resources managed under this session.
|
void |
createCoordinator(org.apache.qpid.proton.engine.Receiver protonReceiver) |
void |
createReceiver(org.apache.qpid.proton.engine.Receiver protonReceiver) |
void |
createSender(org.apache.qpid.proton.engine.Sender protonSender) |
void |
enlist(TransactionId txId) |
void |
flushPendingMessages()
Used to direct all Session managed Senders to push any queued Messages
out to the remote peer.
|
AmqpConnection |
getConnection() |
org.apache.qpid.proton.engine.Session |
getEndpoint() |
long |
getMaxFrameSize() |
SessionId |
getSessionId() |
void |
open()
Request from the remote peer to open this resource.
|
void |
pumpProtonToSocket()
Send all pending work out to the remote peer.
|
void |
registerSender(ConsumerId consumerId,
AmqpSender sender) |
void |
rollback(LocalTransactionId txId)
Rolls back any pending work being down under this session.
|
void |
unregisterSender(ConsumerId consumerId) |
public AmqpSession(AmqpConnection connection, SessionId sessionId, org.apache.qpid.proton.engine.Session session)
connection
- the parent connection for this session.sessionId
- the ActiveMQ SessionId that is used to identify this session.session
- the AMQP Session that this class manages.public void open()
AmqpResource
open
in interface AmqpResource
public void close()
AmqpResource
close
in interface AmqpResource
public void commit(LocalTransactionId txId) throws Exception
txId
- The specific TransactionId that is being committed.Exception
- if an error occurs while attempting to commit work.public void rollback(LocalTransactionId txId) throws Exception
txId
- The specific TransactionId that is being rolled back.Exception
- if an error occurs while attempting to roll back work.public void flushPendingMessages() throws Exception
Exception
- if an error occurs while flushing the messages.public void createCoordinator(org.apache.qpid.proton.engine.Receiver protonReceiver) throws Exception
Exception
public void createReceiver(org.apache.qpid.proton.engine.Receiver protonReceiver) throws Exception
Exception
public void createSender(org.apache.qpid.proton.engine.Sender protonSender) throws Exception
Exception
public void pumpProtonToSocket()
public void registerSender(ConsumerId consumerId, AmqpSender sender)
public void unregisterSender(ConsumerId consumerId)
public void enlist(TransactionId txId)
public AmqpConnection getConnection()
public SessionId getSessionId()
public org.apache.qpid.proton.engine.Session getEndpoint()
public long getMaxFrameSize()
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.