public interface ProtonConnection
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.
|
ProtonConnection |
close()
Closes the AMQP connection, i.e.
|
ProtonConnection |
closeHandler(Handler<AsyncResult<ProtonConnection>> remoteCloseHandler)
Sets a handler for when an AMQP Close 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.
|
ProtonSession |
createSession()
Creates a new session, which can be used to create new senders/receivers on.
|
void |
disconnect()
Disconnects the underlying transport connection.
|
ProtonConnection |
disconnectHandler(Handler<ProtonConnection> disconnectHandler)
Sets a handler for when the underlying transport connection indicates it has disconnected.
|
org.apache.qpid.proton.amqp.transport.ErrorCondition |
getCondition()
Gets the local ErrorCondition object.
|
String |
getContainer()
Gets the container id value requested of/advertised to peers in the AMQP Open frame.
|
String |
getHostname()
Gets the hostname value requested of/advertised to peers in the AMQP Open frame.
|
org.apache.qpid.proton.amqp.transport.ErrorCondition |
getRemoteCondition()
Gets the remote ErrorCondition object.
|
String |
getRemoteContainer()
Returns the container value requested by/advertised by remote peer in their AMQP Open frame.
|
org.apache.qpid.proton.amqp.Symbol[] |
getRemoteDesiredCapabilities()
Returns the desired connection capabilities sent by the remote peer in its Open frame.
|
String |
getRemoteHostname()
Returns the container value requested by/advertised by remote peer in their AMQP Open frame.
|
org.apache.qpid.proton.amqp.Symbol[] |
getRemoteOfferedCapabilities()
Returns the offered connection capabilities sent by the remote peer in its Open frame.
|
Map<org.apache.qpid.proton.amqp.Symbol,Object> |
getRemoteProperties()
Returns the connection properties map if sent by the remote peer in its Open frame.
|
boolean |
isAnonymousRelaySupported()
Allows querying (once the connection has remotely opened) whether the peer advertises support for the anonymous
relay (sender with null address).
|
boolean |
isDisconnected()
Gets whether the underlying transport has indicated it is disconnected.
|
ProtonConnection |
open()
Opens the AMQP connection, i.e.
|
ProtonConnection |
openHandler(Handler<AsyncResult<ProtonConnection>> remoteOpenHandler)
Sets a handler for when an AMQP Open frame is received from the remote peer.
|
ProtonConnection |
receiverOpenHandler(Handler<ProtonReceiver> remoteReceiverOpenHandler)
Sets a handler for when an AMQP Attach frame is received from the remote peer for a receiving link.
|
ProtonConnection |
senderOpenHandler(Handler<ProtonSender> remoteSenderOpenHandler)
Sets a handler for when an AMQP Attach frame is received from the remote peer for a sending link.
|
ProtonConnection |
sessionOpenHandler(Handler<ProtonSession> remoteSessionOpenHandler)
Sets a handler for when an AMQP Begin frame is received from the remote peer.
|
ProtonConnection |
setCondition(org.apache.qpid.proton.amqp.transport.ErrorCondition condition)
Sets the local ErrorCondition object.
|
ProtonConnection |
setContainer(String container)
Sets the container id value advertised to peers in the AMQP Open frame.
|
ProtonConnection |
setDesiredCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
Sets the desired connection capabilities to be sent to the remote peer in our Open frame.
|
ProtonConnection |
setHostname(String hostname)
Sets the hostname value requested of/advertised to peers in the AMQP Open frame.
|
ProtonConnection |
setOfferedCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
Sets the offered connection capabilities to be sent to the remote peer in our Open frame.
|
ProtonConnection |
setProperties(Map<org.apache.qpid.proton.amqp.Symbol,Object> properties)
Sets the connection properties map to be sent to the remote peer in our Open frame.
|
ProtonConnection open()
openHandler(Handler)
may be used to handle the peer sending their
Open frame.ProtonConnection close()
closeHandler(Handler)
may be used to handle the peer sending their
Close frame (if they haven't already).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.ProtonConnection setContainer(String container)
container
- the container id to setString getContainer()
org.apache.qpid.proton.engine.Record attachments()
ProtonConnection setProperties(Map<org.apache.qpid.proton.amqp.Symbol,Object> properties)
properties
- the properties map, or null to request not sending any properties mapMap<org.apache.qpid.proton.amqp.Symbol,Object> getRemoteProperties()
boolean isAnonymousRelaySupported()
ProtonSession createSession()
void disconnect()
disconnectHandler(Handler)
boolean isDisconnected()
ProtonConnection setHostname(String hostname)
hostname
- the hostname to setString getHostname()
String getRemoteContainer()
ProtonConnection setDesiredCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
capabilities
- the capabilities, or null to request not sending any capabilitiesorg.apache.qpid.proton.amqp.Symbol[] getRemoteDesiredCapabilities()
ProtonConnection setOfferedCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
capabilities
- the capabilities, or null to request not sending any capabilitiesorg.apache.qpid.proton.amqp.Symbol[] getRemoteOfferedCapabilities()
String getRemoteHostname()
ProtonConnection 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()
ProtonConnection openHandler(Handler<AsyncResult<ProtonConnection>> remoteOpenHandler)
remoteOpenHandler
- the handlerProtonConnection closeHandler(Handler<AsyncResult<ProtonConnection>> remoteCloseHandler)
remoteCloseHandler
- the handlerProtonConnection sessionOpenHandler(Handler<ProtonSession> remoteSessionOpenHandler)
remoteSessionOpenHandler
- the handlerProtonConnection senderOpenHandler(Handler<ProtonSender> remoteSenderOpenHandler)
remoteSenderOpenHandler
- the handlerProtonConnection receiverOpenHandler(Handler<ProtonReceiver> remoteReceiverOpenHandler)
remoteReceiverOpenHandler
- the handlerProtonConnection disconnectHandler(Handler<ProtonConnection> disconnectHandler)
disconnectHandler
- the handlerCopyright © 2020 Eclipse. All rights reserved.