}
((AmqpDeliveryListener) link.getContext()).drainCheck();
}
protected void processConnectionEvent(Connection connection) throws Exception {
EndpointState remoteState = connection.getRemoteState();
if (remoteState == EndpointState.ACTIVE) {
onConnectionOpen();
} else if (remoteState == EndpointState.CLOSED) {
doClose();
}