Package com.pixelmed.network

## Class ReceivedObjectHandler

- java.lang.Object
- - com.pixelmed.network.ReceivedObjectHandler

- Direct Known Subclasses:
    `DicomCleaner.OurReceivedObjectHandler`, `DoseReporterWithLegacyOCRAndAutoSendToRegistry.OurReceivedObjectHandler`, `DoseUtility.OurReceivedObjectHandler`, `DownloadOrTransmit.OurReceivedObjectHandler`, `InstanceReceiver.OurReceivedObjectHandler`, `LegacyRadiationDoseOCRDicomForwardingService.OurReceivedObjectHandler`, `StudyReceiver.OurReceivedObjectHandler`, `TestCleanerReceiveAndClean.OurReceivedObjectHandler`, `TestCMove.OurReceivedObjectHandler`, `TestCStore_AETs.OurReceivedObjectHandler`, `TestCStore_ConvertTransferSyntaxes.OurReceivedObjectHandler`, `TestCStore.OurReceivedObjectHandler`

      public abstract class ReceivedObjectHandler
      extends java.lang.Object

  This abstract class provides a mechanism for performing processing on a DICOM data set that has been completely received and stored in a file.

  Typically a private sub-class would be declared and instantiated in an implementation using `StorageSOPClassSCPDispatcher`.

  For example:

      private class OurReceivedObjectHandler extends ReceivedObjectHandler {
          public void sendReceivedObjectIndication(String dicomFileName,String transferSyntax,String callingAETitle) throws DicomNetworkException, DicomException, IOException {
              if (dicomFileName != null) {
                  System.err.println("Received: "+dicomFileName+" from "+callingAETitle+" in "+transferSyntax);
                  try {
                      DicomInputStream i = new DicomInputStream(new BufferedInputStream(new FileInputStream(dicomFileName)));
                      AttributeList list = new AttributeList();
                      list.read(i,TagFromName.PixelData);             // no need to read pixel data (much faster if one does not)
                                      i.close();
                      databaseInformationModel.insertObject(list,dicomFileName);
                  } catch (Exception e) {
                      slf4jlogger.error("", e);;
                  }
              }
          }
      }

  See Also:
    `StorageSOPClassSCP`, `StorageSOPClassSCPDispatcher`

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ReceivedObjectHandler()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract void` | `sendReceivedObjectIndication​(java.lang.String fileName, java.lang.String transferSyntax, java.lang.String callingAETitle)` | Do something with the received data set stored in the specified file name.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ReceivedObjectHandler

          public ReceivedObjectHandler()

  - ### Method Detail

    - #### sendReceivedObjectIndication

          public abstract void sendReceivedObjectIndication​(java.lang.String fileName,
                                                            java.lang.String transferSyntax,
                                                            java.lang.String callingAETitle)
                                                     throws DicomNetworkException,
                                                            DicomException,
                                                            java.io.IOException

      Do something with the received data set stored in the specified file name.

      Parameters:
        `fileName` - where the received data set has been stored
        `transferSyntax` - the transfer syntax in which the data set was received and is stored
        `callingAETitle` - the AE title of the caller who sent the data set
      Throws:
        `java.io.IOException`
        `DicomException`
        `DicomNetworkException`