com.pixelmed.network
Class AssociationFactory

java.lang.Object
  extended by com.pixelmed.network.AssociationFactory

public class AssociationFactory
extends Object

A factory object of static methods that can accept and initiate associations.


Constructor Summary
AssociationFactory()
           
 
Method Summary
static com.pixelmed.network.AssociationAcceptor createNewAssociation(Socket socket, String calledAETitle, int debugLevel)
          Deprecated. See createNewAssociation()
static com.pixelmed.network.AssociationAcceptor createNewAssociation(Socket socket, String calledAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, int debugLevel)
          Deprecated. See createNewAssociation()
static com.pixelmed.network.AssociationAcceptor createNewAssociation(Socket socket, String calledAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, PresentationContextSelectionPolicy presentationContextSelectionPolicy, int debugLevel)
          Accepts an association on the supplied open transport connection.
static com.pixelmed.network.AssociationAcceptor createNewAssociation(Socket socket, String calledAETitle, PresentationContextSelectionPolicy presentationContextSelectionPolicy, int debugLevel)
          Accepts an association on the supplied open transport connection.
static com.pixelmed.network.AssociationInitiator createNewAssociation(String hostname, int port, String calledAETitle, String callingAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, LinkedList presentationContexts, LinkedList scuSCPRoleSelections, boolean secureTransport, String username, String password, int debugLevel)
          Opens a transport connection and initiates an association.
static com.pixelmed.network.AssociationInitiator createNewAssociation(String hostname, int port, String calledAETitle, String callingAETitle, LinkedList presentationContexts, LinkedList scuSCPRoleSelections, boolean secureTransport, int debugLevel)
          Opens a transport connection and initiates an association.
static com.pixelmed.network.AssociationInitiator createNewAssociation(String hostname, int port, String calledAETitle, String callingAETitle, LinkedList presentationContexts, LinkedList scuSCPRoleSelections, boolean secureTransport, String username, String password, int debugLevel)
          Opens a transport connection and initiates an association.
static int getDefaultMaximumLengthReceived()
          Get the default Maximum PDU Size that we would like to receive.
static int getDefaultReceiveBufferSize()
          Get the default TCP socket receive buffer size to use to set the socket options.
static int getDefaultSendBufferSize()
          Get the default TCP socket send buffer size to use to set the socket options.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssociationFactory

public AssociationFactory()
Method Detail

getDefaultMaximumLengthReceived

public static int getDefaultMaximumLengthReceived()

Get the default Maximum PDU Size that we would like to receive.

Returns:
the default Maximum PDU Size

getDefaultReceiveBufferSize

public static int getDefaultReceiveBufferSize()

Get the default TCP socket receive buffer size to use to set the socket options.

Returns:
the receive buffer size, 0 means leave the default operating system value alone

getDefaultSendBufferSize

public static int getDefaultSendBufferSize()

Get the default TCP socket send buffer size to use to set the socket options.

Returns:
the send buffer size, 0 means leave the default operating system value alone

createNewAssociation

public static com.pixelmed.network.AssociationInitiator createNewAssociation(String hostname,
                                                                             int port,
                                                                             String calledAETitle,
                                                                             String callingAETitle,
                                                                             int ourMaximumLengthReceived,
                                                                             int socketReceiveBufferSize,
                                                                             int socketSendBufferSize,
                                                                             LinkedList presentationContexts,
                                                                             LinkedList scuSCPRoleSelections,
                                                                             boolean secureTransport,
                                                                             String username,
                                                                             String password,
                                                                             int debugLevel)
                                                                      throws DicomNetworkException,
                                                                             IOException
Opens a transport connection and initiates an association. The default Implementation Class UID and Implementation Version of the toolkit are used.

Parameters:
hostname - hostname or IP address (dotted quad) component of presentation address of the remote AE (them)
port - TCP port component of presentation address of the remote AE (them)
calledAETitle - the AE Title of the remote (their) end of the association
callingAETitle - the AE Title of the local (our) end of the association
ourMaximumLengthReceived - the maximum PDU length that we will offer to receive
socketReceiveBufferSize - the TCP socket receive buffer size to set (if possible), 0 means leave at the default
socketSendBufferSize - the TCP socket send buffer size to set (if possible), 0 means leave at the default
presentationContexts - a java.util.LinkedList of PresentationContext objects, each of which contains an Abstract Syntax (SOP Class UID) and one or more Transfer Syntaxes
scuSCPRoleSelections - a java.util.LinkedList of SCUSCPRoleSelection objects, each of which contains an Abstract Syntax (SOP Class UID) and specifies whether SCU and/or SCP roles are supported
secureTransport - true if to use secure transport protocol
username - may be null if no user identity
password - may be null if no user identity or no password required
debugLevel - 0 for no debugging, > 0 for increasingly verbose debugging
Returns:
an open association in state 6 - Data Transfer
Throws:
IOException
DicomNetworkException - thrown for A-ASSOCIATE-RJ, A-ABORT and A-P-ABORT indications

createNewAssociation

public static com.pixelmed.network.AssociationInitiator createNewAssociation(String hostname,
                                                                             int port,
                                                                             String calledAETitle,
                                                                             String callingAETitle,
                                                                             LinkedList presentationContexts,
                                                                             LinkedList scuSCPRoleSelections,
                                                                             boolean secureTransport,
                                                                             int debugLevel)
                                                                      throws DicomNetworkException,
                                                                             IOException
Opens a transport connection and initiates an association. The default Implementation Class UID, Implementation Version and Maximum PDU Size of the toolkit are used.

Parameters:
hostname - hostname or IP address (dotted quad) component of presentation address of the remote AE (them)
port - TCP port component of presentation address of the remote AE (them)
calledAETitle - the AE Title of the remote (their) end of the association
callingAETitle - the AE Title of the local (our) end of the association
presentationContexts - a java.util.LinkedList of PresentationContext objects, each of which contains an Abstract Syntax (SOP Class UID) and one or more Transfer Syntaxes
scuSCPRoleSelections - a java.util.LinkedList of SCUSCPRoleSelection objects, each of which contains an Abstract Syntax (SOP Class UID) and specifies whether SCU and/or SCP roles are supported
secureTransport - true if to use secure transport protocol
debugLevel - 0 for no debugging, > 0 for increasingly verbose debugging
Returns:
an open association in state 6 - Data Transfer
Throws:
IOException
DicomNetworkException - thrown for A-ASSOCIATE-RJ, A-ABORT and A-P-ABORT indications

createNewAssociation

public static com.pixelmed.network.AssociationInitiator createNewAssociation(String hostname,
                                                                             int port,
                                                                             String calledAETitle,
                                                                             String callingAETitle,
                                                                             LinkedList presentationContexts,
                                                                             LinkedList scuSCPRoleSelections,
                                                                             boolean secureTransport,
                                                                             String username,
                                                                             String password,
                                                                             int debugLevel)
                                                                      throws DicomNetworkException,
                                                                             IOException
Opens a transport connection and initiates an association. The default Implementation Class UID, Implementation Version and Maximum PDU Size of the toolkit are used.

Parameters:
hostname - hostname or IP address (dotted quad) component of presentation address of the remote AE (them)
port - TCP port component of presentation address of the remote AE (them)
calledAETitle - the AE Title of the remote (their) end of the association
callingAETitle - the AE Title of the local (our) end of the association
presentationContexts - a java.util.LinkedList of PresentationContext objects, each of which contains an Abstract Syntax (SOP Class UID) and one or more Transfer Syntaxes
scuSCPRoleSelections - a java.util.LinkedList of SCUSCPRoleSelection objects, each of which contains an Abstract Syntax (SOP Class UID) and specifies whether SCU and/or SCP roles are supported
secureTransport - true if to use secure transport protocol
username - may be null if no user identity
password - may be null if no user identity or no password required
debugLevel - 0 for no debugging, > 0 for increasingly verbose debugging
Returns:
an open association in state 6 - Data Transfer
Throws:
IOException
DicomNetworkException - thrown for A-ASSOCIATE-RJ, A-ABORT and A-P-ABORT indications

createNewAssociation

public static com.pixelmed.network.AssociationAcceptor createNewAssociation(Socket socket,
                                                                            String calledAETitle,
                                                                            int ourMaximumLengthReceived,
                                                                            int socketReceiveBufferSize,
                                                                            int socketSendBufferSize,
                                                                            int debugLevel)
                                                                     throws DicomNetworkException,
                                                                            IOException
Deprecated. See createNewAssociation()

Accepts an association on the supplied open transport connection. The default Implementation Class UID and Implementation Version of the toolkit are used. The default UnencapsulatedExplicitStoreFindMoveGetPresentationContextSelectionPolicy is used.

Parameters:
socket - already open transport connection on which the association is to be accepted
calledAETitle - the AE Title of the local (our) end of the association
ourMaximumLengthReceived - the maximum PDU length that we will offer to receive
socketReceiveBufferSize - the TCP socket receive buffer size to set (if possible), 0 means leave at the default
socketSendBufferSize - the TCP socket send buffer size to set (if possible), 0 means leave at the default
debugLevel - 0 for no debugging, > 0 for increasingly verbose debugging
Returns:
an open association in state 6 - Data Transfer
Throws:
IOException
DicomNetworkException - thrown for A-ABORT and A-P-ABORT indications

createNewAssociation

public static com.pixelmed.network.AssociationAcceptor createNewAssociation(Socket socket,
                                                                            String calledAETitle,
                                                                            int ourMaximumLengthReceived,
                                                                            int socketReceiveBufferSize,
                                                                            int socketSendBufferSize,
                                                                            PresentationContextSelectionPolicy presentationContextSelectionPolicy,
                                                                            int debugLevel)
                                                                     throws DicomNetworkException,
                                                                            IOException
Accepts an association on the supplied open transport connection. The default Implementation Class UID and Implementation Version of the toolkit are used.

Parameters:
socket - already open transport connection on which the association is to be accepted
calledAETitle - the AE Title of the local (our) end of the association
ourMaximumLengthReceived - the maximum PDU length that we will offer to receive
socketReceiveBufferSize - the TCP socket receive buffer size to set (if possible), 0 means leave at the default
socketSendBufferSize - the TCP socket send buffer size to set (if possible), 0 means leave at the default
presentationContextSelectionPolicy - which SOP Classes and Transfer Syntaxes to accept and reject
debugLevel - 0 for no debugging, > 0 for increasingly verbose debugging
Returns:
an open association in state 6 - Data Transfer
Throws:
IOException
DicomNetworkException - thrown for A-ABORT and A-P-ABORT indications

createNewAssociation

public static com.pixelmed.network.AssociationAcceptor createNewAssociation(Socket socket,
                                                                            String calledAETitle,
                                                                            PresentationContextSelectionPolicy presentationContextSelectionPolicy,
                                                                            int debugLevel)
                                                                     throws DicomNetworkException,
                                                                            IOException
Accepts an association on the supplied open transport connection. The default Implementation Class UID, Implementation Version and Maximum PDU Size of the toolkit are used. The default maximum length received, receive buffer size and send buffer size are used.

Parameters:
socket - already open transport connection on which the association is to be accepted
calledAETitle - the AE Title of the local (our) end of the association
presentationContextSelectionPolicy - which SOP Classes and Transfer Syntaxes to accept and reject
debugLevel - 0 for no debugging, > 0 for increasingly verbose debugging
Returns:
an open association in state 6 - Data Transfer
Throws:
IOException
DicomNetworkException - thrown for A-ABORT and A-P-ABORT indications

createNewAssociation

public static com.pixelmed.network.AssociationAcceptor createNewAssociation(Socket socket,
                                                                            String calledAETitle,
                                                                            int debugLevel)
                                                                     throws DicomNetworkException,
                                                                            IOException
Deprecated. See createNewAssociation()

Accepts an association on the supplied open transport connection. The default Implementation Class UID, Implementation Version and Maximum PDU Size of the toolkit are used. The default maximum length received, receive buffer size and send buffer size are used. The default UnencapsulatedExplicitStoreFindMoveGetPresentationContextSelectionPolicy is used.

Parameters:
socket - already open transport connection on which the association is to be accepted
calledAETitle - the AE Title of the local (our) end of the association
debugLevel - 0 for no debugging, > 0 for increasingly verbose debugging
Returns:
an open association in state 6 - Data Transfer
Throws:
IOException
DicomNetworkException - thrown for A-ABORT and A-P-ABORT indications