public class ClientSession extends java.lang.Thread implements IDataNotificationReceiver, IConnectionListener
| Constructor and Description |
|---|
ClientSession(DicomMessage objDicomMessage)
Initiates new Client Session.
|
ClientSession(IProcessHandler objProcessHandler,
java.net.Socket socket)
Instantiates a new client session.
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptConnection(boolean acceptConnection)
Accept connection.
|
void |
addClientStatusListener(IClientStatusListener objIClientStatusListener)
Adds the client status listener.
|
boolean |
close()
This method close the Client Session.
|
void |
closeConnection()
This function is automatically invoked when connection is closed by remote end.
|
AgreedAssociation |
getAgreedAssociation()
Gets the agreed association.
|
ServerSideAssociationAgent |
getAssociationAgent()
Gets the server side association agent.
|
boolean |
getAssociationStatus()
Retrieves Association status.
|
ISingleCollection<java.lang.Short> |
getCancelledMsgIDCollection()
Returns the collection of DICOM message IDs for which C-CANCEL RQ
is received from service class user.
|
java.net.InetSocketAddress |
getClientAddress()
Gets the client address.
|
DefaultAssociation |
getDefaultAssociation()
Gets the default association.
|
DicomMessage |
getDicomMessage()
Gets the dicom message.
|
boolean |
getDICOMMsgValidationStatus()
Retrieves Status for Dicom Message Validation.
|
IDIMSEAssociation |
getDIMSEAssociation()
Gets the DIMSE association.
|
EnumEarlyFailedStatus |
getEarlyFailedStatus()
This method gets the Early Failed Status.
|
PDUReader |
getPduReader()
Retrieves the PDUReader
|
PDUWriter |
getPduWriter()
Retrieves the PDUWriter
|
IProcessHandler |
getProcessHandler()
Retrieves the Process Handler
|
ServerSideAssociationAgent |
getServerSideAssociationAgent()
Gets the server side association agent.
|
ServiceAgent |
getServiceAgent()
Gets the server side service agent.
|
void |
initComm()
Initializes the communication and registers with all Agents and Listeners.
|
boolean |
isConnectionAccepted()
Checks if connection is accepted.
|
boolean |
isSecured()
Returns socket communication status.
|
void |
notifyData(DataNotificationEvent objDataNotificationEvent)
Notify data.
|
void |
onException(DicomException ex,
EnumErrorCode ErrorCode)
Gets automatically invoked when exception occur while processing data received
|
void |
run() |
boolean |
sendAssociationMessage(IDIMSEAssociation objDIMSEAssociation)
Send association message.
|
boolean |
sendServiceMessage(DicomMessage objDicomMessage)
Send service message.
|
void |
setAgreedAssociation(AgreedAssociation objAgreedAssociation)
Sets the agreed association.
|
void |
setAssociationAgent(ServerSideAssociationAgent objServerSideAssociationAgent)
Sets the server side association agent.
|
void |
setAssociationStatus(boolean associationStatus)
Sets the Association Staus.
|
void |
setClientAddress(java.net.InetSocketAddress objClientAddress)
Sets the client address.
|
void |
setDefaultAssociation(DefaultAssociation objDefaultAssociation)
Sets the default association.
|
void |
setDRequest(DIMSERequest objDicomMessage)
Sets the Dicom Message
|
void |
setPduReader(PDUReader pduReader)
Sets the PDUReader
|
void |
setPduWriter(PDUWriter pduWriter)
Sets the PDU Writer.
|
void |
setProcessHandler(IProcessHandler objProcessHandler)
Sets the Process Handler.
|
void |
setSecured(boolean isSecured)
sets socket communication status.
|
void |
setServerSideAssociationAgent(ServerSideAssociationAgent objServerSideAssociationAgent)
Sets the server side association agent.
|
void |
setServiceAgent(ServiceAgent objServiceAgent)
Sets the server side service agent.
|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic ClientSession(DicomMessage objDicomMessage)
public ClientSession(IProcessHandler objProcessHandler, java.net.Socket socket)
objProcessHandler - instance of process Handler.socket - instance of Socket.public void initComm()
public void closeConnection()
closeConnection in interface IConnectionListenerpublic void notifyData(DataNotificationEvent objDataNotificationEvent)
notifyData in interface IDataNotificationReceiverobjDataNotificationEvent - instance of Data Notification Event.java.io.IOException - Signals that an I/O exception has occurred.public boolean sendServiceMessage(DicomMessage objDicomMessage) throws java.io.IOException
objDicomMessage - instance of Dicom Messagejava.io.IOException - Signals that an I/O exception has occurred.public boolean sendAssociationMessage(IDIMSEAssociation objDIMSEAssociation)
objDIMSEAssociation - instance of DIMSE Association.java.io.IOException - Signals that an I/O exception has occurred.public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void addClientStatusListener(IClientStatusListener objIClientStatusListener)
objIClientStatusListener - instance of Client Status Listener.public DefaultAssociation getDefaultAssociation()
public EnumEarlyFailedStatus getEarlyFailedStatus()
public void setDefaultAssociation(DefaultAssociation objDefaultAssociation)
objDefaultAssociation - instance of Default Association.public java.net.InetSocketAddress getClientAddress()
public void setClientAddress(java.net.InetSocketAddress objClientAddress)
objClientAddress - instance of INet Socket Address.public DicomMessage getDicomMessage()
public void setDRequest(DIMSERequest objDicomMessage)
objDicomMessage - instance of dicom message.public ServerSideAssociationAgent getAssociationAgent()
public void setAssociationAgent(ServerSideAssociationAgent objServerSideAssociationAgent)
objServerSideAssociationAgent - object of server side association agentpublic ServiceAgent getServiceAgent()
public void setServiceAgent(ServiceAgent objServiceAgent)
objServiceAgent - instance of Server Side Association Agent.public IDIMSEAssociation getDIMSEAssociation()
public void setAgreedAssociation(AgreedAssociation objAgreedAssociation)
objAgreedAssociation - instance of agreed association.public AgreedAssociation getAgreedAssociation()
public boolean isConnectionAccepted()
public void acceptConnection(boolean acceptConnection)
acceptConnection - boolean variable accepting connection.
true - if connection is accepted.
false - if connection is not accepted.public boolean close()
public IProcessHandler getProcessHandler()
public void setProcessHandler(IProcessHandler objProcessHandler)
objProcessHandler - instance of Process Handler.public PDUReader getPduReader()
public void setPduReader(PDUReader pduReader)
pduReader - instance of PDUReaderpublic PDUWriter getPduWriter()
public void setPduWriter(PDUWriter pduWriter)
pduWriter - instance of PDUWriterpublic void setServerSideAssociationAgent(ServerSideAssociationAgent objServerSideAssociationAgent)
objServerSideAssociationAgent - object of server side association agentpublic ServerSideAssociationAgent getServerSideAssociationAgent()
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 isSecured()
public ISingleCollection<java.lang.Short> getCancelledMsgIDCollection()
public void setSecured(boolean isSecured)
isSecured - the isSecured to setpublic boolean getDICOMMsgValidationStatus()
public void onException(DicomException ex, EnumErrorCode ErrorCode)
IDataNotificationReceiveronException in interface IConnectionListeneronException in interface IDataNotificationReceiverex - - the exception objectErrorCode - - the reason of the DicomException