public interface ProtonLink<T extends ProtonLink<T>>
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.
|
T |
close()
Closes the AMQP link, i.e.
|
T |
closeHandler(Handler<AsyncResult<T>> remoteCloseHandler)
Sets a handler for when an AMQP Detach frame with closed=true is received from the remote peer.
|
T |
detach()
Detaches the AMQP link, i.e.
|
T |
detachHandler(Handler<AsyncResult<T>> remoteDetachHandler)
Sets a handler for when an AMQP Detach frame with closed=false is received from the remote peer.
|
void |
free()
Tidies up related link resources when complete with use.
|
org.apache.qpid.proton.amqp.transport.ErrorCondition |
getCondition()
Gets the local ErrorCondition object.
|
int |
getCredit()
Retrieves the current amount of credit.
|
boolean |
getDrain()
Retrieves the current value of link 'drain' flag.
|
org.apache.qpid.proton.amqp.UnsignedLong |
getMaxMessageSize()
Gets the local link max message size.
|
String |
getName()
Retrieves the link name
|
ProtonQoS |
getQoS()
Gets the local QOS config.
|
int |
getQueued()
Retrieves the current number of queued messages.
|
String |
getRemoteAddress()
Retrieves the remote address from the remote terminus (source for receivers, target for senders).
|
org.apache.qpid.proton.amqp.transport.ErrorCondition |
getRemoteCondition()
Gets the remote ErrorCondition object.
|
org.apache.qpid.proton.amqp.Symbol[] |
getRemoteDesiredCapabilities()
Gets the remote desired capabilities, as conveyed from the peer via the Attach frame
when attaching the link to the session.
|
org.apache.qpid.proton.amqp.UnsignedLong |
getRemoteMaxMessageSize()
Gets the remote link max message size, as conveyed from the peer via the Attach frame
when attaching the link to the session.
|
org.apache.qpid.proton.amqp.Symbol[] |
getRemoteOfferedCapabilities()
Gets the remote offered capabilities, as conveyed from the peer via the Attach frame
when attaching the link to the session.
|
Map<org.apache.qpid.proton.amqp.Symbol,Object> |
getRemoteProperties()
Gets the remote link properties, as conveyed from the peer via the Attach frame
when attaching the link to the session.
|
ProtonQoS |
getRemoteQoS()
Gets the remote QOS config.
|
org.apache.qpid.proton.amqp.transport.Source |
getRemoteSource()
Gets the current remote source config.
|
org.apache.qpid.proton.amqp.transport.Target |
getRemoteTarget()
Gets the current remote target config.
|
ProtonSession |
getSession()
Gets the session this link is on.
|
org.apache.qpid.proton.amqp.transport.Source |
getSource()
Gets the current local source config.
|
org.apache.qpid.proton.amqp.transport.Target |
getTarget()
Gets the current local target config.
|
boolean |
isOpen()
Check whether the link is locally open.
|
T |
open()
Opens the AMQP link, i.e.
|
T |
openHandler(Handler<AsyncResult<T>> remoteOpenHandler)
Sets a handler for when an AMQP Attach frame is received from the remote peer.
|
T |
setCondition(org.apache.qpid.proton.amqp.transport.ErrorCondition condition)
Sets the local ErrorCondition object.
|
void |
setDesiredCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
Sets the desired capabilities, to be conveyed to the peer via the Attach frame
when attaching the link to the session.
|
void |
setMaxMessageSize(org.apache.qpid.proton.amqp.UnsignedLong maxMessageSize)
Sets the local link max message size, to be conveyed to the peer via the Attach frame
when attaching the link to the session.
|
void |
setOfferedCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
Sets the offered capabilities, to be conveyed to the peer via the Attach frame
when attaching the link to the session.
|
void |
setProperties(Map<org.apache.qpid.proton.amqp.Symbol,Object> properties)
Sets the link properties, to be conveyed to the peer via the Attach frame
when attaching the link to the session.
|
T |
setQoS(ProtonQoS qos)
Sets the local QOS config.
|
T |
setSource(org.apache.qpid.proton.amqp.transport.Source source)
Sets the current local source config.
|
T |
setTarget(org.apache.qpid.proton.amqp.transport.Target target)
Sets the current local target config.
|
T open()
openHandler(Handler)
may be used to handle the peer sending their Attach
frame.T close()
closeHandler(Handler)
should be used to handle the peer
sending their Detach frame with closed=true (and detachHandler(Handler)
can be used to handle the peer
sending their Detach frame with closed=false). When use of the link is complete, i.e it is locally and
remotely closed, free()
must be called to ensure related resources can be tidied up.T detach()
detachHandler(Handler)
should be used to handle the peer
sending their Detach frame with closed=false (and closeHandler(Handler)
can be used to handle the peer
sending their Detach frame with closed=true). When use of the link is complete, i.e it is locally and
remotely detached, free()
must be called to ensure related resources can be tidied up.T openHandler(Handler<AsyncResult<T>> remoteOpenHandler)
ProtonConnection.senderOpenHandler(Handler)
and
ProtonConnection.receiverOpenHandler(Handler)
.remoteOpenHandler
- the handlerT closeHandler(Handler<AsyncResult<T>> remoteCloseHandler)
remoteCloseHandler
- the handlerT detachHandler(Handler<AsyncResult<T>> remoteDetachHandler)
remoteDetachHandler
- the handlerProtonQoS getQoS()
T setQoS(ProtonQoS qos)
qos
- the QOS to configureProtonQoS getRemoteQoS()
boolean isOpen()
org.apache.qpid.proton.engine.Record attachments()
org.apache.qpid.proton.amqp.transport.Target getTarget()
T setTarget(org.apache.qpid.proton.amqp.transport.Target target)
target
- the targetorg.apache.qpid.proton.amqp.transport.Target getRemoteTarget()
org.apache.qpid.proton.amqp.transport.Source getSource()
T setSource(org.apache.qpid.proton.amqp.transport.Source source)
source
- the sourceorg.apache.qpid.proton.amqp.transport.Source getRemoteSource()
ProtonSession getSession()
String getRemoteAddress()
T 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()
int getCredit()
getQueued()
to assess the number of credits that will be used by queued messages.boolean getDrain()
int getQueued()
String getName()
void setMaxMessageSize(org.apache.qpid.proton.amqp.UnsignedLong maxMessageSize)
open()
method.
Receivers setting this can use the ProtonReceiver.maxMessageSizeExceededHandler(Handler)
to be made aware if the limit is exceeded by the sending peer. See the handler doc for additional
detail on the resulting behaviour.maxMessageSize
- the local max message size value, or null to clear. 0 also means no limit.org.apache.qpid.proton.amqp.UnsignedLong getMaxMessageSize()
setMaxMessageSize(UnsignedLong)
org.apache.qpid.proton.amqp.UnsignedLong getRemoteMaxMessageSize()
void setProperties(Map<org.apache.qpid.proton.amqp.Symbol,Object> properties)
open()
method.properties
- the properties of the link to be coveyed to the remote peer.Map<org.apache.qpid.proton.amqp.Symbol,Object> getRemoteProperties()
void setOfferedCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
open()
method.capabilities
- the capabilities offered to the remote peer.org.apache.qpid.proton.amqp.Symbol[] getRemoteOfferedCapabilities()
void setDesiredCapabilities(org.apache.qpid.proton.amqp.Symbol[] capabilities)
open()
method.capabilities
- the capabilities desired of the remote peer.org.apache.qpid.proton.amqp.Symbol[] getRemoteDesiredCapabilities()
void free()
Copyright © 2020 Eclipse. All rights reserved.