void sendStgCmtResult(NetworkApplicationEntity stgcmtAE, DicomObject result) throws Exception { synchronized (ae) { ae.setReuseAssocationFromAETitle( stgcmtReuseFrom ? new String[] {stgcmtAE.getAETitle()} : new String[] {}); ae.setReuseAssocationToAETitle( stgcmtReuseTo ? new String[] {stgcmtAE.getAETitle()} : new String[] {}); Association as = ae.connect(stgcmtAE, executor); as.nevent( UID.StorageCommitmentPushModelSOPClass, UID.StorageCommitmentPushModelSOPInstance, eventTypeIdOf(result), result, UID.ImplicitVRLittleEndian, nEventReportRspHandler); if (!stgcmtReuseFrom && !stgcmtReuseTo) { as.release(true); } } }