public abstract class AmqpAbstractLink<LINK_TYPE extends org.apache.qpid.proton.engine.Link> extends Object implements AmqpLink
Modifier and Type | Field and Description |
---|---|
protected List<Runnable> |
closeActions |
protected boolean |
closed |
protected LINK_TYPE |
endpoint |
protected boolean |
opened |
protected AmqpSession |
session |
Constructor and Description |
---|
AmqpAbstractLink(AmqpSession session,
LINK_TYPE endpoint)
Creates a new AmqpLink type.
|
Modifier and Type | Method and Description |
---|---|
void |
addCloseAction(Runnable action)
Adds a new Runnable that is called on close of this link.
|
void |
close()
Request from the remote peer to close this resource.
|
void |
close(org.apache.qpid.proton.amqp.transport.ErrorCondition error)
Close the Link with an error indicating the reson for the close.
|
void |
detach()
Request from the remote peer to detach this resource.
|
LINK_TYPE |
getEndpoint() |
AmqpSession |
getSession() |
boolean |
isClosed() |
boolean |
isOpened() |
void |
open()
Request from the remote peer to open this resource.
|
protected void |
sendToActiveMQ(Command command)
Shortcut method to hand off an ActiveMQ Command to the broker and assign
a ResponseHandler to deal with any reply from the broker.
|
protected void |
sendToActiveMQ(Command command,
ResponseHandler handler)
Shortcut method to hand off an ActiveMQ Command to the broker and assign
a ResponseHandler to deal with any reply from the broker.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
commit, delivery, flow, getDestination, rollback, setDestination
protected final AmqpSession session
protected boolean closed
protected boolean opened
protected List<Runnable> closeActions
public AmqpAbstractLink(AmqpSession session, LINK_TYPE endpoint)
session
- the AmqpSession that servers as the parent of this Link.endpoint
- the link endpoint this object represents.public void open()
AmqpResource
open
in interface AmqpResource
public void detach()
AmqpLink
public void close(org.apache.qpid.proton.amqp.transport.ErrorCondition error)
AmqpLink
public void close()
AmqpResource
close
in interface AmqpResource
public boolean isOpened()
public boolean isClosed()
public LINK_TYPE getEndpoint()
public AmqpSession getSession()
public void addCloseAction(Runnable action)
AmqpLink
addCloseAction
in interface AmqpLink
action
- a Runnable that will be executed when the link closes or detaches.protected void sendToActiveMQ(Command command)
command
- the Command object to send to the Broker.protected void sendToActiveMQ(Command command, ResponseHandler handler)
command
- the Command object to send to the Broker.handler
- the ResponseHandler that will handle the Broker's response.Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.