public class SCUSession extends java.lang.Object implements IDataNotificationReceiver, IConnectionListener
| Constructor and Description |
|---|
SCUSession()
Instantiates a new SCU session.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAsyncReceiver(IAsyncReceiver objIAsyncReceiver)
Adds the async receiver.
|
boolean |
associate(IDIMSEAssociation objDIMSEAssociation)
This method establishes association.
|
boolean |
close()
Closes the session and set all resources free.
|
void |
closeConnection()
This function is automatically invoked when connection is closed by remote end.
|
boolean |
connectionState() |
void |
endSession(boolean b)
Sets the end session variable true.
|
AgreedAssociation |
getAgreedAssociation()
Gets Agreed Association.
|
boolean |
getAssociationStatus()
Retrieves Association status.
|
ClientSideAssociationAgent |
getClientSideAssociationAgent()
Retrieves the ClientSideAssociationAgent.
|
IDIMSEAssociation |
getDIMSEAssociation()
Gets the DIMSE association.
|
EnumEarlyFailedStatus |
getEarlyFailedStatus()
This method gets the Early Failed Status.
|
int |
getNumberOfRequestSend()
This function indicates the No of requests send by the user.
|
PDUReader |
getPduReader()
Retrieves the PDUReader.
|
PDUWriter |
getPduWriter()
Retrieves the PDUWriter.
|
ServiceAgent |
getServiceAgent()
Retrieves the ServiceAgent.
|
int |
getTimeOut()
Returns setting for Socket read timeout of this session,
0 returns implies that the option is disabled (i.e., timeout of infinity).
|
boolean |
isSecured()
Returns socket communication status.
|
void |
notifyData(DataNotificationEvent objDataNotificationEvent)
Notify ProcessHandler according to the response received and initializes association parameters.
|
void |
onException(DicomException ex,
EnumErrorCode ErrorCode)
Gets automatically invoked when exception occur while processing data received
|
boolean |
releaseAssociation()
This method releases the current association.
|
boolean |
sendAssociationMessage(IDIMSEAssociation objDIMSEAssociation)
Sends the association Message to client side Association agent.
|
boolean |
sendServiceMessage(DicomMessage objDicomMessge)
Sends the Service Message to service agent.
|
void |
setAssociationStatus(boolean associationStatus)
Sets the Association Staus.
|
void |
setClientSideAssociationAgent(ClientSideAssociationAgent objClientSideAssociationAgent)
Sets the ClientSideAssociationAgent.
|
void |
setConnectionState(boolean isConnected)
Sets the connection state
|
void |
setExceptionListener(IExceptionListener objExceptionListener)
Sets the ExceptionListener on SCU session to notify user about the exceptions occurred
|
void |
setMessageListener(SCU objSCU)
Sets the message listener.
|
void |
setPduReader(PDUReader pduReader)
Sets the PDUReader.
|
void |
setPduWriter(PDUWriter pduWriter)
Sets the PDUWriter.
|
void |
setSecured(boolean isSecured)
sets socket communication status.
|
void |
setServiceAgent(ServiceAgent objServiceAgent)
Sets the ServiceAgent.
|
void |
setTimeOut(int itimeout)
sets Socket read timeout of this session, in
milliseconds.
|
void |
start(java.net.InetSocketAddress addr)
Start the SCU session with the INet socket address given.
|
void |
start(java.lang.String strIP,
int iPort)
Start the SCU session with the IP and port given.
|
public SCUSession()
throws java.io.IOException
java.io.IOException - Signals if an IO Exception occurs.public void start(java.lang.String strIP,
int iPort)
throws java.io.IOException
strIP - String value of IP.iPort - int value of port.java.io.IOException - Signals that an I/O exception has occurred.public void start(java.net.InetSocketAddress addr)
throws java.io.IOException
addr - instance of InetSocketAddress.java.io.IOException - Signals that an I/O exception has occurred.public void setExceptionListener(IExceptionListener objExceptionListener)
objExceptionListener - public void closeConnection()
closeConnection in interface IConnectionListenerpublic void setConnectionState(boolean isConnected)
isConnected - public EnumEarlyFailedStatus getEarlyFailedStatus()
public void setAssociationStatus(boolean associationStatus)
associationStatus - boolean variable indicating Association Status.
true - if association is Alive.
false - if association does not exits.public boolean getAssociationStatus()
public boolean connectionState()
public void notifyData(DataNotificationEvent objDataNotificationEvent) throws java.io.IOException
notifyData in interface IDataNotificationReceiverobjDataNotificationEvent - the obj data notification eventjava.io.IOException - Signals that an I/O exception has occurred.public AgreedAssociation getAgreedAssociation()
public boolean associate(IDIMSEAssociation objDIMSEAssociation)
objDIMSEAssociation - - instance of IDIMSEAssociationpublic boolean releaseAssociation()
public boolean sendAssociationMessage(IDIMSEAssociation objDIMSEAssociation)
objDIMSEAssociation - the object of DIMSE associationpublic boolean sendServiceMessage(DicomMessage objDicomMessge) throws java.io.IOException
objDicomMessge - instance of Dicom Messagejava.io.IOException - Signals that an I/O exception has occurred.public int getNumberOfRequestSend()
public IDIMSEAssociation getDIMSEAssociation()
public void endSession(boolean b)
b - true to end the session.public boolean close()
public ClientSideAssociationAgent getClientSideAssociationAgent()
public void setClientSideAssociationAgent(ClientSideAssociationAgent objClientSideAssociationAgent)
objClientSideAssociationAgent - instance of ClientSideAssociationAgent.public ServiceAgent getServiceAgent()
public void setServiceAgent(ServiceAgent objServiceAgent)
objServiceAgent - instance of ServiceAgent.public PDUReader getPduReader()
public void setPduReader(PDUReader pduReader)
pduReader - instance of PDUReaderpublic PDUWriter getPduWriter()
public void setPduWriter(PDUWriter pduWriter)
pduWriter - instance of PDUWriterpublic void setMessageListener(SCU objSCU)
objSCU - object of SCU which is to be set as Message Listener.public void addAsyncReceiver(IAsyncReceiver objIAsyncReceiver)
objIAsyncReceiver - the obj i async receiverpublic boolean isSecured()
public void setSecured(boolean isSecured)
isSecured - the isSecured to setpublic int getTimeOut()
public void setTimeOut(int itimeout)
timeout - the specified timeout, in milliseconds.public void onException(DicomException ex, EnumErrorCode ErrorCode)
onException in interface IConnectionListeneronException in interface IDataNotificationReceiverobjClientSession - - object of Client Session.ex - - the exception objectErrorCode - - the reason of the DicomException