com.pixelmed.network
Class ReceivedObjectHandler

java.lang.Object
  extended by com.pixelmed.network.ReceivedObjectHandler
Direct Known Subclasses:
DicomCleaner.OurReceivedObjectHandler, DoseReporterWithLegacyOCRAndAutoSendToRegistry.OurReceivedObjectHandler, DoseUtility.OurReceivedObjectHandler, DownloadOrTransmit.OurReceivedObjectHandler, LegacyRadiationDoseOCRDicomForwardingService.OurReceivedObjectHandler, TestCleanerReceiveAndClean.OurReceivedObjectHandler, TestCStore.OurReceivedObjectHandler

public abstract class ReceivedObjectHandler
extends 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) {
                e.printStackTrace(System.err);
            }
        }
    }
}
 

See Also:
StorageSOPClassSCP, StorageSOPClassSCPDispatcher

Constructor Summary
ReceivedObjectHandler()
           
 
Method Summary
abstract  void sendReceivedObjectIndication(String fileName, String transferSyntax, String callingAETitle)
          Do something with the received data set stored in the specified file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReceivedObjectHandler

public ReceivedObjectHandler()
Method Detail

sendReceivedObjectIndication

public abstract void sendReceivedObjectIndication(String fileName,
                                                  String transferSyntax,
                                                  String callingAETitle)
                                           throws DicomNetworkException,
                                                  DicomException,
                                                  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:
IOException
DicomException
DicomNetworkException