Class AssociationFactory

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

public class AssociationFactory extends Object

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

  • Constructor Details

    • AssociationFactory

      public AssociationFactory()
  • Method Details

    • 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) 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
      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) 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
      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) 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
      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, PresentationContextSelectionPolicy presentationContextSelectionPolicy) 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
      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) 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
      Returns:
      an open association in state 6 - Data Transfer
      Throws:
      IOException
      DicomNetworkException - thrown for A-ABORT and A-P-ABORT indications