use of com.swiftmq.amqp.v100.client.po.POCloseLink in project swiftmq-client by iitsoftware.
the class Link method remoteDetach.
protected void remoteDetach(Error error) {
this.error = error;
mySession.detach(this);
cancel();
POCloseLink po = new POCloseLink(null, this);
mySession.getSessionDispatcher().dispatch(po);
}
use of com.swiftmq.amqp.v100.client.po.POCloseLink in project swiftmq-client by iitsoftware.
the class Link method close.
/**
* Close this link.
*
* @throws AMQPException on error
*/
public void close() throws AMQPException {
if (closed)
return;
Semaphore sem = new Semaphore();
POCloseLink po = new POCloseLink(sem, this);
mySession.getSessionDispatcher().dispatch(po);
sem.waitHere();
mySession.detach(this);
closed = true;
if (!po.isSuccess())
throw new AMQPException(po.getException());
}
Aggregations