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(org.apache.activemq.command.Command command)
Shorcut 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(org.apache.activemq.command.Command command,
ResponseHandler handler)
Shorcut 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, waitcommit, delivery, flow, getDestination, rollback, setDestinationprotected 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()
AmqpResourceopen in interface AmqpResourcepublic void detach()
AmqpLinkpublic void close(org.apache.qpid.proton.amqp.transport.ErrorCondition error)
AmqpLinkpublic void close()
AmqpResourceclose in interface AmqpResourcepublic boolean isOpened()
public boolean isClosed()
public LINK_TYPE getEndpoint()
public AmqpSession getSession()
public void addCloseAction(Runnable action)
AmqpLinkaddCloseAction in interface AmqpLinkaction - a Runnable that will be executed when the link closes or detaches.protected void sendToActiveMQ(org.apache.activemq.command.Command command)
command - the Command object to send to the Broker.protected void sendToActiveMQ(org.apache.activemq.command.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–2017 FuseSource, Corp.. All rights reserved.