public class ServiceAgent extends java.lang.Object implements IServicePDUReceiver, IAssociationStatusListener
| Constructor and Description |
|---|
ServiceAgent(PDUWriter pduWriter)
Instantiates a new Service Agent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDataNotificationListener(IDataNotificationReceiver recvr)
Registeres the data notification listener.
|
void |
dispose()
Dispose.
|
AgreedAssociation |
getAgreedAssociation()
Retrieves the Agreed Association created in association negotiation process.
|
DicomMessage |
getDicomMessage()
Retrieves the dicom message.
|
EnumEarlyFailedStatus |
getEarlyFailedStatus()
Retrieves the EarlyFailed Status for last received DicomMessage.
|
boolean |
isPDUProcessingContinued() |
void |
onException(DicomException ex,
EnumErrorCode ErrorCode)
Gets automatically invoked when exception occur while processing data received
|
boolean |
sendServiceMessage(DicomMessage objDicomMessage)
Sends Dicom Message in form of PDUs.
|
void |
servicePDUReceive(ServiceEvent objServiceEvent)
It processes the arrived service message according to the association status.
|
void |
setAgreedAssociation(AgreedAssociation objAgreedAssociation)
Sets the Agreed Association created in association negotiation process.
|
void |
setAssociationStatus(boolean associationStatus)
Sets the current status of association notified from Association Agent whenever association status is updated.
|
void |
setDicomMessage(DicomMessage objDicomMessge)
Sets the Dicom Message.
|
void |
setEarlyFailedStatus(EnumEarlyFailedStatus enumMsgStatus)
Sets the EarlyFailed Status for last received DicomMessage.
|
void |
stopProcess()
Stops the process.
|
public ServiceAgent(PDUWriter pduWriter)
pduWriter - instance of PDUWriterpublic EnumEarlyFailedStatus getEarlyFailedStatus()
public void setEarlyFailedStatus(EnumEarlyFailedStatus enumMsgStatus)
enumMsgStatus - the enumMsgStatus to setpublic void servicePDUReceive(ServiceEvent objServiceEvent) throws java.io.IOException
servicePDUReceive in interface IServicePDUReceiverobjServiceEvent - instance of ServiceEventjava.io.IOException - Signals that an I/O exception has occurred.public void onException(DicomException ex, EnumErrorCode ErrorCode)
onException in interface IServicePDUReceiverobjClientSession - - object of Client Session.ex - - the exception objectErrorCode - - the reason of the DicomExceptionpublic void setDicomMessage(DicomMessage objDicomMessge)
objDicomMessge - instance of Dicom Messagepublic DicomMessage getDicomMessage()
public void addDataNotificationListener(IDataNotificationReceiver recvr)
recvr - instance of IDataNotificationReceiverpublic boolean sendServiceMessage(DicomMessage objDicomMessage) throws java.io.IOException
objDicomMessage - instance of DicomMessagejava.io.IOException - Signals that an I/O exception has occurred.public void setAgreedAssociation(AgreedAssociation objAgreedAssociation)
objAgreedAssociation - instance of Agreed Associationpublic AgreedAssociation getAgreedAssociation()
public void stopProcess()
public void dispose()
public void setAssociationStatus(boolean associationStatus)
setAssociationStatus in interface IAssociationStatusListenerassociationStatus - - shows the status of association.public boolean isPDUProcessingContinued()