public class ProtonConnectionImpl extends Object implements ProtonConnection
| Modifier and Type | Field and Description |
|---|---|
static org.apache.qpid.proton.amqp.Symbol |
ANONYMOUS_RELAY |
| Modifier and Type | Method and Description |
|---|---|
void |
addEndHandler(Handler<Void> handler) |
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>> closeHandler)
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.
|
ProtonSessionImpl |
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.
|
void |
fireDisconnect() |
void |
flush() |
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.
|
ContextInternal |
getContext() |
String |
getHostname()
Gets the hostname value requested of/advertised to peers in the AMQP Open frame.
|
org.apache.qpid.proton.engine.EndpointState |
getLocalState() |
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.
|
org.apache.qpid.proton.engine.EndpointState |
getRemoteState() |
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>> openHandler)
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.
|
ProtonConnectionImpl |
setCondition(org.apache.qpid.proton.amqp.transport.ErrorCondition condition)
Sets the local ErrorCondition object.
|
ProtonConnectionImpl |
setContainer(String container)
Sets the container id value advertised to peers in the AMQP Open frame.
|
ProtonConnectionImpl |
setDesiredCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
Sets the desired connection capabilities to be sent to the remote peer in our Open frame.
|
ProtonConnectionImpl |
setHostname(String hostname)
Sets the hostname value requested of/advertised to peers in the AMQP Open frame.
|
ProtonConnectionImpl |
setOfferedCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
Sets the offered connection capabilities to be sent to the remote peer in our Open frame.
|
ProtonConnectionImpl |
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.
|
public ProtonConnectionImpl setProperties(Map<org.apache.qpid.proton.amqp.Symbol,Object> properties)
ProtonConnectionsetProperties in interface ProtonConnectionproperties - the properties map, or null to request not sending any properties mappublic ProtonConnectionImpl setOfferedCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
ProtonConnectionsetOfferedCapabilities in interface ProtonConnectioncapabilities - the capabilities, or null to request not sending any capabilitiespublic ProtonConnectionImpl setHostname(String hostname)
ProtonConnectionsetHostname in interface ProtonConnectionhostname - the hostname to setpublic ProtonConnectionImpl setDesiredCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
ProtonConnectionsetDesiredCapabilities in interface ProtonConnectioncapabilities - the capabilities, or null to request not sending any capabilitiespublic ProtonConnectionImpl setContainer(String container)
ProtonConnectionsetContainer in interface ProtonConnectioncontainer - the container id to setpublic ProtonConnectionImpl setCondition(org.apache.qpid.proton.amqp.transport.ErrorCondition condition)
ProtonConnectionsetCondition in interface ProtonConnectioncondition - the condition to setpublic org.apache.qpid.proton.amqp.transport.ErrorCondition getCondition()
ProtonConnectiongetCondition in interface ProtonConnectionpublic String getContainer()
ProtonConnectiongetContainer in interface ProtonConnectionpublic String getHostname()
ProtonConnectiongetHostname in interface ProtonConnectionpublic org.apache.qpid.proton.engine.EndpointState getLocalState()
public org.apache.qpid.proton.amqp.transport.ErrorCondition getRemoteCondition()
ProtonConnectiongetRemoteCondition in interface ProtonConnectionpublic String getRemoteContainer()
ProtonConnectiongetRemoteContainer in interface ProtonConnectionpublic org.apache.qpid.proton.amqp.Symbol[] getRemoteDesiredCapabilities()
ProtonConnectiongetRemoteDesiredCapabilities in interface ProtonConnectionpublic String getRemoteHostname()
ProtonConnectiongetRemoteHostname in interface ProtonConnectionpublic org.apache.qpid.proton.amqp.Symbol[] getRemoteOfferedCapabilities()
ProtonConnectiongetRemoteOfferedCapabilities in interface ProtonConnectionpublic Map<org.apache.qpid.proton.amqp.Symbol,Object> getRemoteProperties()
ProtonConnectiongetRemoteProperties in interface ProtonConnectionpublic org.apache.qpid.proton.engine.EndpointState getRemoteState()
public boolean isAnonymousRelaySupported()
ProtonConnectionisAnonymousRelaySupported in interface ProtonConnectionpublic org.apache.qpid.proton.engine.Record attachments()
ProtonConnectionattachments in interface ProtonConnectionpublic ProtonConnection open()
ProtonConnectionProtonConnection.openHandler(Handler) may be used to handle the peer sending their
Open frame.open in interface ProtonConnectionpublic ProtonConnection close()
ProtonConnectionProtonConnection.closeHandler(Handler) may be used to handle the peer sending their
Close frame (if they haven't already).close in interface ProtonConnectionpublic ProtonSessionImpl createSession()
ProtonConnectioncreateSession in interface ProtonConnectionpublic ProtonSender createSender(String address)
ProtonConnectioncreateSender in interface ProtonConnectionaddress - The target address to attach to, or null to attach to the anonymous relay.public ProtonSender createSender(String address, ProtonLinkOptions senderOptions)
ProtonConnectioncreateSender in interface ProtonConnectionaddress - The target address to attach to, or null to attach to the anonymous relay.senderOptions - The options for this sender.public ProtonReceiver createReceiver(String address)
ProtonConnectioncreateReceiver in interface ProtonConnectionaddress - The source address to attach the consumer to.public ProtonReceiver createReceiver(String address, ProtonLinkOptions receiverOptions)
ProtonConnectioncreateReceiver in interface ProtonConnectionaddress - The source address to attach the consumer to.receiverOptions - The options for this receiver.public void flush()
public void disconnect()
ProtonConnectiondisconnect in interface ProtonConnectionProtonConnection.disconnectHandler(Handler)public boolean isDisconnected()
ProtonConnectionisDisconnected in interface ProtonConnectionpublic ProtonConnection openHandler(Handler<AsyncResult<ProtonConnection>> openHandler)
ProtonConnectionopenHandler in interface ProtonConnectionopenHandler - the handlerpublic ProtonConnection closeHandler(Handler<AsyncResult<ProtonConnection>> closeHandler)
ProtonConnectioncloseHandler in interface ProtonConnectioncloseHandler - the handlerpublic ProtonConnection disconnectHandler(Handler<ProtonConnection> disconnectHandler)
ProtonConnectiondisconnectHandler in interface ProtonConnectiondisconnectHandler - the handlerpublic ProtonConnection sessionOpenHandler(Handler<ProtonSession> remoteSessionOpenHandler)
ProtonConnectionsessionOpenHandler in interface ProtonConnectionremoteSessionOpenHandler - the handlerpublic ProtonConnection senderOpenHandler(Handler<ProtonSender> remoteSenderOpenHandler)
ProtonConnectionsenderOpenHandler in interface ProtonConnectionremoteSenderOpenHandler - the handlerpublic ProtonConnection receiverOpenHandler(Handler<ProtonReceiver> remoteReceiverOpenHandler)
ProtonConnectionreceiverOpenHandler in interface ProtonConnectionremoteReceiverOpenHandler - the handlerpublic void fireDisconnect()
public ContextInternal getContext()
Copyright © 2020. All rights reserved.