use of org.dcm4che3.net.AssociationListener in project dcm4chee-arc-light by dcm4che.
the class CStoreForward method createTask.
private CStoreForwardTask createTask(final Association as) {
ApplicationEntity localAE = retrieveCtx.getLocalApplicationEntity();
Association storeas = openAssociation(as, localAE);
final CStoreForwardTask task = new CStoreForwardTask(retrieveCtx, storeas);
forwardTasks.put(as, task);
as.addAssociationListener(new AssociationListener() {
@Override
public void onClose(Association association) {
task.onStore(null);
forwardTasks.remove(as);
}
});
if (storeas != null) {
retrieveCtx.incrementPendingCStoreForward();
localAE.getDevice().execute(task);
}
return task;
}
Aggregations