Package com.pixelmed.network

# Class ReceivedDataHandler

java.lang.Object
com.pixelmed.network.ReceivedDataHandler

Direct Known Subclasses:
  `CompositeResponseHandler`

public abstract class ReceivedDataHandler extends Object

This abstract class provides a mechanism to process each PDU as it is received on an association.

Typically a private sub-class would be declared and instantiated overriding the `sendPDataIndication()` method.

See Also:
  - `CompositeResponseHandler`
  - `StorageSOPClassSCP`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`done`
`protected boolean`
`release`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`dumpPDVList(LinkedList pdvList)`
Dump a list of the Presentation Data Values supplied to standard error
`protected String`
`dumpPDVListToString(LinkedList pdvList)`
Log a list of the Presentation Data Values supplied at the debug level
`boolean`
`isDone()`
Are we finished ?
`boolean`
`isToBeReleased()`
Are we to release the association once done ?
`abstract void`
`sendPDataIndication(PDataPDU pdata, Association association)`
The code handling the reception of data on an `Association` calls this method to indicate that a PDU has been received (a P-DATA-INDICATION).
`void`
`setDone(boolean done)`
The code handling the reception of data on an `Association` calls this method to indicate that no more PDUs are expected.
`void`
`setRelease(boolean release)`
The code handling the reception of data on an `Association` calls this method to indicate that the association is to be released once done.

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

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

## Field Details

### done

protected boolean done

### release

protected boolean release

## Method Details

### dumpPDVList

protected void dumpPDVList(LinkedList pdvList)
Dump a list of the Presentation Data Values supplied to standard error

Parameters:
  `pdvList` - a java.util.LinkedList of `PresentationDataValue`

### dumpPDVListToString

protected String dumpPDVListToString(LinkedList pdvList)
Log a list of the Presentation Data Values supplied at the debug level

Parameters:
  `pdvList` - a java.util.LinkedList of `PresentationDataValue`

### sendPDataIndication

public abstract void sendPDataIndication(PDataPDU pdata, Association association) throws DicomNetworkException, DicomException, IOException
The code handling the reception of data on an `Association` calls this method to indicate that a PDU has been received (a P-DATA-INDICATION).

Parameters:
  `pdata` - the PDU that was received
  `association` - the association on which the PDU was received
Throws:
  `IOException`
  `DicomException`
  `DicomNetworkException`

### isDone

public boolean isDone()
Are we finished ?

Returns:
  true when no more PDUs are expected

### isToBeReleased

public boolean isToBeReleased()
Are we to release the association once done ?

Returns:
  true when association is to be released once done

### setDone

public void setDone(boolean done)
The code handling the reception of data on an `Association` calls this method to indicate that no more PDUs are expected.

Parameters:
  `done` - to be set to true when no more PDUs are expected, usually when the last fragment of the data (or command, if no data) is seen

### setRelease

public void setRelease(boolean release)
The code handling the reception of data on an `Association` calls this method to indicate that the association is to be released once done.

Parameters:
  `release` - to be set to true when the assoication is to be released once done