Class StorageSOPClassSCP

java.lang.Object
com.pixelmed.dicom.SOPClass
com.pixelmed.network.StorageSOPClassSCP
All Implemented Interfaces:
Runnable

public class StorageSOPClassSCP extends SOPClass implements Runnable

This class implements the SCP role of SOP Classes of the Storage Service Class, the Study Root Query Retrieve Information Model Find, Get and Move SOP Classes, and the Verification SOP Class.

The class has a constructor and a run() method. The constructor is passed a socket on which has been received a transport connection open indication. The run() method waits for an association to be initiated (i.e. acts as an association acceptor), then waits for storage or verification commands, storing data sets in Part 10 files in the specified folder.

Debugging messages with a varying degree of verbosity can be activated.

This class is not normally used directly, but rather is instantiated by the StorageSOPClassSCPDispatcher, which takes care of listening for transport connection open indications, and creates new threads and starts them to handle each incoming association request.

See Also:
  • Field Details

  • Constructor Details

    • StorageSOPClassSCP

      public StorageSOPClassSCP(Socket socket, String calledAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, File savedImagesFolder, StoredFilePathStrategy storedFilePathStrategy, ReceivedObjectHandler receivedObjectHandler, AssociationStatusHandler associationStatusHandler, QueryResponseGeneratorFactory queryResponseGeneratorFactory, RetrieveResponseGeneratorFactory retrieveResponseGeneratorFactory, ApplicationEntityMap applicationEntityMap, PresentationContextSelectionPolicy presentationContextSelectionPolicy, int debugLevel) throws DicomNetworkException, DicomException, IOException

      Construct an instance of an association acceptor and storage, query, retrieve and verification SCP to be passed to the constructor of a thread that will be started.

      Parameters:
      socket - the socket on which a transport connection open indication has been received
      calledAETitle - our AE Title
      ourMaximumLengthReceived - the maximum PDU length that we will offer to receive
      socketReceiveBufferSize - the TCP socket receive buffer size to set (if possible), 0 means leave at the default
      socketSendBufferSize - the TCP socket send buffer size to set (if possible), 0 means leave at the default
      savedImagesFolder - the folder in which to store received data sets (may be null, to ignore received data for testing)
      storedFilePathStrategy - the strategy to use for naming received files and folders
      receivedObjectHandler - the handler to call after each data set has been received and stored
      associationStatusHandler - the handler to call when the Association is closed
      queryResponseGeneratorFactory - a factory to make handlers to generate query responses from a supplied query message
      retrieveResponseGeneratorFactory - a factory to make handlers to generate retrieve responses from a supplied retrieve message
      applicationEntityMap - a map of application entity titles to presentation addresses
      presentationContextSelectionPolicy - which SOP Classes and Transfer Syntaxes to accept and reject
      debugLevel - ignored
      Throws:
      IOException
      DicomException
      DicomNetworkException
    • StorageSOPClassSCP

      public StorageSOPClassSCP(Socket socket, String calledAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, File savedImagesFolder, StoredFilePathStrategy storedFilePathStrategy, ReceivedObjectHandler receivedObjectHandler, AssociationStatusHandler associationStatusHandler, QueryResponseGeneratorFactory queryResponseGeneratorFactory, RetrieveResponseGeneratorFactory retrieveResponseGeneratorFactory, ApplicationEntityMap applicationEntityMap, PresentationContextSelectionPolicy presentationContextSelectionPolicy) throws DicomNetworkException, DicomException, IOException

      Construct an instance of an association acceptor and storage, query, retrieve and verification SCP to be passed to the constructor of a thread that will be started.

      Parameters:
      socket - the socket on which a transport connection open indication has been received
      calledAETitle - our AE Title
      ourMaximumLengthReceived - the maximum PDU length that we will offer to receive
      socketReceiveBufferSize - the TCP socket receive buffer size to set (if possible), 0 means leave at the default
      socketSendBufferSize - the TCP socket send buffer size to set (if possible), 0 means leave at the default
      savedImagesFolder - the folder in which to store received data sets (may be null, to ignore received data for testing)
      storedFilePathStrategy - the strategy to use for naming received files and folders
      receivedObjectHandler - the handler to call after each data set has been received and stored
      associationStatusHandler - the handler to call when the Association is closed
      queryResponseGeneratorFactory - a factory to make handlers to generate query responses from a supplied query message
      retrieveResponseGeneratorFactory - a factory to make handlers to generate retrieve responses from a supplied retrieve message
      applicationEntityMap - a map of application entity titles to presentation addresses
      presentationContextSelectionPolicy - which SOP Classes and Transfer Syntaxes to accept and reject
      Throws:
      IOException
      DicomException
      DicomNetworkException
  • Method Details

    • run

      public void run()

      Waits for an association to be initiated (acts as an association acceptor), then waits for storage or verification commands, storing data sets in Part 10 files in the specified folder, until the association is released or the transport connection closes.

      Specified by:
      run in interface Runnable