public interface ProtonSession
Modifier and Type | Method and Description |
---|---|
org.apache.qpid.proton.engine.Record |
attachments()
Retrieves the attachments record, upon which application items can be set/retrieved.
|
ProtonSession |
close()
Closed the AMQP session, i.e.
|
ProtonSession |
closeHandler(Handler<AsyncResult<ProtonSession>> remoteCloseHandler)
Sets a handler for when an AMQP End frame is received from the remote peer.
|
ProtonReceiver |
createReceiver(String address)
Creates a receiver used to consumer messages from the given node address.
|
ProtonReceiver |
createReceiver(String address,
ProtonLinkOptions receiverOptions)
Creates a receiver used to consumer messages from the given node address.
|
ProtonSender |
createSender(String address)
Creates a sender used to send messages to the given node address.
|
ProtonSender |
createSender(String address,
ProtonLinkOptions senderOptions)
Creates a sender used to send messages to the given node address.
|
void |
free()
Tidies up related session resources when complete with use.
|
org.apache.qpid.proton.amqp.transport.ErrorCondition |
getCondition()
Gets the local ErrorCondition object.
|
ProtonConnection |
getConnection()
Gets the connection this session is on.
|
int |
getIncomingCapacity()
Gets the incoming capacity in bytes, used to govern session-level flow control.
|
org.apache.qpid.proton.amqp.transport.ErrorCondition |
getRemoteCondition()
Gets the remote ErrorCondition object.
|
ProtonSession |
open()
Opens the AMQP session, i.e.
|
ProtonSession |
openHandler(Handler<AsyncResult<ProtonSession>> remoteOpenHandler)
Sets a handler for when an AMQP Begin frame is received from the remote peer.
|
ProtonSession |
setCondition(org.apache.qpid.proton.amqp.transport.ErrorCondition condition)
Sets the local ErrorCondition object.
|
ProtonSession |
setIncomingCapacity(int capacity)
Sets the incoming capacity in bytes, used to govern session-level flow control.
|
ProtonReceiver createReceiver(String address)
address
- The source address to attach the consumer to.ProtonReceiver createReceiver(String address, ProtonLinkOptions receiverOptions)
address
- The source address to attach the consumer to.receiverOptions
- The options for this receiver.ProtonSender createSender(String address)
address
- The target address to attach to, or null to attach to the anonymous relay.ProtonSender createSender(String address, ProtonLinkOptions senderOptions)
address
- The target address to attach to, or null to attach to the anonymous relay.senderOptions
- The options for this sender.ProtonSession open()
openHandler(Handler)
may be used to handle the peer sending their
Begin frame.ProtonSession close()
closeHandler(Handler)
may be used to handle the peer
sending their End frame. When use of the session is complete, i.e it is locally and
remotely closed, free()
must be called to ensure related resources can be tidied up.org.apache.qpid.proton.engine.Record attachments()
ProtonSession setIncomingCapacity(int capacity)
capacity
- capacity in bytesint getIncomingCapacity()
ProtonConnection getConnection()
ProtonSession setCondition(org.apache.qpid.proton.amqp.transport.ErrorCondition condition)
condition
- the condition to setorg.apache.qpid.proton.amqp.transport.ErrorCondition getCondition()
org.apache.qpid.proton.amqp.transport.ErrorCondition getRemoteCondition()
ProtonSession openHandler(Handler<AsyncResult<ProtonSession>> remoteOpenHandler)
ProtonConnection.sessionOpenHandler(Handler)
.remoteOpenHandler
- the handlerProtonSession closeHandler(Handler<AsyncResult<ProtonSession>> remoteCloseHandler)
remoteCloseHandler
- the handlervoid free()
Copyright © 2020 Eclipse. All rights reserved.