public class SCPSession
extends java.lang.Object
DefaultAssociation
Before the SCPSession is started to listen for accepting connections, it is necessary to configure the SCPSession.
This configuration involves adding the ProcessHandler,DefaultAssociation onto the SCPSession.| Constructor and Description |
|---|
SCPSession() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the SCP Session.
|
ISingleCollection<java.net.InetSocketAddress> |
getClientsConnectionInfo()
Retrieves list of connection info for all currently active clients
|
DefaultAssociation |
getDefaultAssociation()
Gets the default association.
|
IProcessHandler |
getIProcessHandler()
Gets the Process handler.
|
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 |
isClientConnected(java.net.InetSocketAddress objAddress)
Shows current status of client,whether it is active or not, for given Inet Socket Address
|
int |
noOfClientsConnected()
Retrieves number of clients currently connected to SCP.
|
void |
selectServices(EnumServiceType[] enumServiceTypes) |
void |
setDefaultAssociation(DefaultAssociation objDefaultAssociation)
Sets the default association.
|
void |
setIProcessHandler(IProcessHandler objIProcessHandler)
Sets the process handler.
|
void |
setTimeOut(int itimeout)
sets Socket read timeout of this session, in
milliseconds.
|
void |
start(java.lang.String strAETitle,
java.net.InetAddress ip,
int iPort)
This method starts the SCP session on the specified Ip and Port.
|
void |
start(java.lang.String strAETitle,
int iPort)
This method starts the SCP session on the local host.
|
void |
start(java.lang.String strAETitle,
java.net.Socket socket)
This method starts the SCP session on the local host.
|
void |
start(java.lang.String strAETitle,
java.lang.String strIP,
int iPort)
This method starts the SCP session on specified IP and port.
|
void |
stopListening()
Stops listening on this SCPSession so that new client connection
not accepted and continue to process already connected clients.
|
public DefaultAssociation getDefaultAssociation()
public void setDefaultAssociation(DefaultAssociation objDefaultAssociation)
objDefaultAssociation - instance of Default Association.public IProcessHandler getIProcessHandler()
public void setIProcessHandler(IProcessHandler objIProcessHandler)
objIProcessHandler - - instance of Process handler.public void selectServices(EnumServiceType[] enumServiceTypes)
public void start(java.lang.String strAETitle,
java.lang.String strIP,
int iPort)
throws java.io.IOException,
AssociationLoadFailedException
strAETitle - Application Entity Title representation used to identify the DICOM nodes communicating between each other.strIP - String value of IP.iPort - int value of port.java.io.IOException - Signals that an I/O exception has occurred.AssociationLoadFailedExceptionpublic void start(java.lang.String strAETitle,
int iPort)
throws java.io.IOException
strAETitle - Application Entity Title representation used to identify the DICOM nodes communicating between each other.iPort - int value of port.java.io.IOException - Signals that an I/O exception has occurred.public void start(java.lang.String strAETitle,
java.net.InetAddress ip,
int iPort)
throws java.io.IOException
strAETitle - Application Entity Title representation used to identify the DICOM nodes communicating between each other.ip - instance of INet Address.iPort - int value of port.java.io.IOException - Signals that an I/O exception has occurred.public void start(java.lang.String strAETitle,
java.net.Socket socket)
throws java.io.IOException
strAETitle - Application Entity Title representation used to identify the DICOM nodes communicating between each other.socket. - java.io.IOException - Signals that an I/O exception has occurred.public int noOfClientsConnected()
public boolean isClientConnected(java.net.InetSocketAddress objAddress)
objAddress - InetSocketAddress of clientpublic ISingleCollection<java.net.InetSocketAddress> getClientsConnectionInfo()
public void close()
public void stopListening()
public int getTimeOut()
public void setTimeOut(int itimeout)
timeout - the specified timeout, in milliseconds.