Class CompositeResponseHandler

    • Field Detail

      • commandReceived

        protected byte[] commandReceived
      • dataReceived

        protected byte[] dataReceived
      • success

        protected boolean success
      • allowData

        protected boolean allowData
      • status

        protected int status
    • Constructor Detail

      • CompositeResponseHandler

        public CompositeResponseHandler​(int debugLevel)
        Construct a handler to process each PDU of a composite response as it is received, evaluating the status of the response for success.
        Parameters:
        debugLevel - 0 for no debugging, > 0 for increasingly verbose debugging
    • Method Detail

      • getAttributeListFromCommandOrData

        public static AttributeList getAttributeListFromCommandOrData​(byte[] bytes,
                                                                      java.lang.String transferSyntaxUID,
                                                                      int debugLevel)
                                                               throws DicomNetworkException,
                                                                      DicomException,
                                                                      java.io.IOException
        Extract an AttributeList from the concatenated bytes that have been assembled from one or more PDUs and which make up an entire Command or Dataset.
        Parameters:
        bytes - the concatenated PDU bytes up to and including the last fragment
        transferSyntaxUID - the Transfer Syntax to use to interpret the bytes
        debugLevel - integer debug level
        Throws:
        java.io.IOException
        DicomException
        DicomNetworkException
      • dumpAttributeListFromCommandOrData

        public static java.lang.String dumpAttributeListFromCommandOrData​(byte[] bytes,
                                                                          java.lang.String transferSyntaxUID)
                                                                   throws DicomNetworkException,
                                                                          DicomException,
                                                                          java.io.IOException
        Extract an AttributeList from the concatenated bytes that have been assembled from one or more PDUs and which make up an entire Command or Dataset.
        Parameters:
        bytes - the concatenated PDU bytes up to and including the last fragment
        transferSyntaxUID - the Transfer Syntax to use to interpret the bytes
        Throws:
        java.io.IOException
        DicomException
        DicomNetworkException
      • evaluateStatusAndSetSuccess

        protected abstract void evaluateStatusAndSetSuccess​(AttributeList list)
        Extract the status information from a composite response and set the status flag accordingly.
        Parameters:
        list - the list of Attributes extracted from the bytes of the PDU(s)
      • makeUseOfDataSet

        protected void makeUseOfDataSet​(AttributeList list)
        Ignore any data set in the composite response (unless this method is overridden).
        Parameters:
        list - the list of Attributes extracted from the bytes of the PDU(s)
      • wasSuccessful

        public boolean wasSuccessful()
        Does the response include an indication of success ?