|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pixelmed.network.ReceivedDataHandler
com.pixelmed.network.CompositeResponseHandler
public abstract class CompositeResponseHandler
This abstract class provides a mechanism to process each PDU of a composite response as it is received, such as for evaluating the status of the response for success.
Typically a private sub-class would be declared and instantiated with overriding methods to evaluate the success or failure of a storage or query or retrieve response.
ReceivedDataHandler,
StorageSOPClassSCU,
FindSOPClassSCU| Field Summary | |
|---|---|
protected boolean |
allowData
|
protected byte[] |
commandReceived
|
protected byte[] |
dataReceived
|
protected int |
status
|
protected boolean |
success
|
| Fields inherited from class com.pixelmed.network.ReceivedDataHandler |
|---|
debugLevel, done, release |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
static String |
dumpAttributeListFromCommandOrData(byte[] bytes,
String transferSyntaxUID)
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. |
protected abstract void |
evaluateStatusAndSetSuccess(AttributeList list)
Extract the status information from a composite response and set the status flag accordingly. |
static AttributeList |
getAttributeListFromCommandOrData(byte[] bytes,
String transferSyntaxUID,
int debugLevel)
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. |
int |
getStatus()
Get the response status Valid only after first calling evaluateStatusAndSetSuccess() |
protected void |
makeUseOfDataSet(AttributeList list)
Ignore any data set in the composite response (unless this method is overridden). |
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). |
boolean |
wasSuccessful()
Does the response include an indication of success ? |
| Methods inherited from class com.pixelmed.network.ReceivedDataHandler |
|---|
dumpPDVList, isDone, isToBeReleased, setDone, setRelease |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected byte[] commandReceived
protected byte[] dataReceived
protected boolean success
protected boolean allowData
protected int status
| Constructor Detail |
|---|
public CompositeResponseHandler(int debugLevel)
debugLevel - 0 for no debugging, > 0 for increasingly verbose debugging| Method Detail |
|---|
public static AttributeList getAttributeListFromCommandOrData(byte[] bytes,
String transferSyntaxUID,
int debugLevel)
throws DicomNetworkException,
DicomException,
IOException
AttributeList from the concatenated bytes
that have been assembled from one or more PDUs and which make up an entire
Command or Dataset.
bytes - the concatenated PDU bytes up to and including the last fragmenttransferSyntaxUID - the Transfer Syntax to use to interpret the bytesdebugLevel - integer debug level
IOException
DicomException
DicomNetworkException
public static String dumpAttributeListFromCommandOrData(byte[] bytes,
String transferSyntaxUID)
throws DicomNetworkException,
DicomException,
IOException
AttributeList from the concatenated bytes
that have been assembled from one or more PDUs and which make up an entire
Command or Dataset.
bytes - the concatenated PDU bytes up to and including the last fragmenttransferSyntaxUID - the Transfer Syntax to use to interpret the bytes
IOException
DicomException
DicomNetworkException
public void sendPDataIndication(PDataPDU pdata,
Association association)
throws DicomNetworkException,
DicomException,
IOException
Association calls
this method to indicate that a PDU has been received (a P-DATA-INDICATION).
sendPDataIndication in class ReceivedDataHandlerpdata - the PDU that was receivedassociation - the association on which the PDU was received
IOException
DicomException
DicomNetworkExceptionprotected abstract void evaluateStatusAndSetSuccess(AttributeList list)
list - the list of Attributes extracted from the bytes of the PDU(s)protected void makeUseOfDataSet(AttributeList list)
list - the list of Attributes extracted from the bytes of the PDU(s)public boolean wasSuccessful()
public int getStatus()
evaluateStatusAndSetSuccess()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||