@Override public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse, Attributes cmd, Attributes data) throws IOException { if (dimse != Dimse.N_EVENT_REPORT_RQ) throw new DicomServiceException(Status.UnrecognizedOperation); int eventTypeID = cmd.getInt(Tag.EventTypeID, 0); if (eventTypeID != 1 && eventTypeID != 2) throw new DicomServiceException(Status.NoSuchEventType) .setEventTypeID(eventTypeID); String tuid = data.getString(Tag.TransactionUID); try { Attributes rsp = Commands.mkNEventReportRSP(cmd, status); Attributes rspAttrs = StgCmtSCU.this.eventRecord(as, cmd, data); as.writeDimseRSP(pc, rsp, rspAttrs); } catch (AssociationStateException e) { LOG.warn("{} << N-EVENT-RECORD-RSP failed: {}", as, e.getMessage()); } finally { removeOutstandingResult(tuid); } } };
@Override public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse, Attributes cmd, Attributes data) throws IOException { if (dimse != Dimse.N_EVENT_REPORT_RQ) throw new DicomServiceException(Status.UnrecognizedOperation); int eventTypeID = cmd.getInt(Tag.EventTypeID, 0); if (eventTypeID != 1 && eventTypeID != 2) throw new DicomServiceException(Status.NoSuchEventType) .setEventTypeID(eventTypeID); String tuid = data.getString(Tag.TransactionUID); try { Attributes rsp = Commands.mkNEventReportRSP(cmd, status); Attributes rspAttrs = StgCmtSCU.this.eventRecord(as, cmd, data); as.writeDimseRSP(pc, rsp, rspAttrs); } catch (AssociationStateException e) { LOG.warn("{} << N-EVENT-RECORD-RSP failed: {}", as, e.getMessage()); } finally { removeOutstandingResult(tuid); } } };