public class AssociationFactory
extends java.lang.Object
A factory object of static methods that can accept and initiate associations.
Constructor and Description |
---|
AssociationFactory() |
Modifier and Type | Method and Description |
---|---|
static com.pixelmed.network.AssociationAcceptor |
createNewAssociation(java.net.Socket socket,
java.lang.String calledAETitle,
int ourMaximumLengthReceived,
int socketReceiveBufferSize,
int socketSendBufferSize,
PresentationContextSelectionPolicy presentationContextSelectionPolicy)
Accepts an association on the supplied open transport connection.
|
static com.pixelmed.network.AssociationAcceptor |
createNewAssociation(java.net.Socket socket,
java.lang.String calledAETitle,
PresentationContextSelectionPolicy presentationContextSelectionPolicy)
Accepts an association on the supplied open transport connection.
|
static com.pixelmed.network.AssociationInitiator |
createNewAssociation(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
int ourMaximumLengthReceived,
int socketReceiveBufferSize,
int socketSendBufferSize,
java.util.LinkedList presentationContexts,
java.util.LinkedList scuSCPRoleSelections,
boolean secureTransport,
java.lang.String username,
java.lang.String password)
Opens a transport connection and initiates an association.
|
static com.pixelmed.network.AssociationInitiator |
createNewAssociation(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
java.util.LinkedList presentationContexts,
java.util.LinkedList scuSCPRoleSelections,
boolean secureTransport)
Opens a transport connection and initiates an association.
|
static com.pixelmed.network.AssociationInitiator |
createNewAssociation(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
java.util.LinkedList presentationContexts,
java.util.LinkedList scuSCPRoleSelections,
boolean secureTransport,
java.lang.String username,
java.lang.String password)
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.
|
public static com.pixelmed.network.AssociationAcceptor createNewAssociation(java.net.Socket socket, java.lang.String calledAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, PresentationContextSelectionPolicy presentationContextSelectionPolicy) throws DicomNetworkException, java.io.IOException
socket
- already open transport connection on which the association is to be acceptedcalledAETitle
- the AE Title of the local (our) end of the associationourMaximumLengthReceived
- the maximum PDU length that we will offer to receivesocketReceiveBufferSize
- the TCP socket receive buffer size to set (if possible), 0 means leave at the defaultsocketSendBufferSize
- the TCP socket send buffer size to set (if possible), 0 means leave at the defaultpresentationContextSelectionPolicy
- which SOP Classes and Transfer Syntaxes to accept and rejectjava.io.IOException
DicomNetworkException
- thrown for A-ABORT and A-P-ABORT indicationspublic static com.pixelmed.network.AssociationAcceptor createNewAssociation(java.net.Socket socket, java.lang.String calledAETitle, PresentationContextSelectionPolicy presentationContextSelectionPolicy) throws DicomNetworkException, java.io.IOException
socket
- already open transport connection on which the association is to be acceptedcalledAETitle
- the AE Title of the local (our) end of the associationpresentationContextSelectionPolicy
- which SOP Classes and Transfer Syntaxes to accept and rejectjava.io.IOException
DicomNetworkException
- thrown for A-ABORT and A-P-ABORT indicationspublic static com.pixelmed.network.AssociationInitiator createNewAssociation(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, java.util.LinkedList presentationContexts, java.util.LinkedList scuSCPRoleSelections, boolean secureTransport, java.lang.String username, java.lang.String password) throws DicomNetworkException, java.io.IOException
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 associationcallingAETitle
- the AE Title of the local (our) end of the associationourMaximumLengthReceived
- the maximum PDU length that we will offer to receivesocketReceiveBufferSize
- the TCP socket receive buffer size to set (if possible), 0 means leave at the defaultsocketSendBufferSize
- the TCP socket send buffer size to set (if possible), 0 means leave at the defaultpresentationContexts
- a java.util.LinkedList of PresentationContext
objects, each of which contains an Abstract Syntax (SOP Class UID) and one or more Transfer SyntaxesscuSCPRoleSelections
- 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 supportedsecureTransport
- true if to use secure transport protocolusername
- may be null if no user identitypassword
- may be null if no user identity or no password requiredjava.io.IOException
DicomNetworkException
- thrown for A-ASSOCIATE-RJ, A-ABORT and A-P-ABORT indicationspublic static com.pixelmed.network.AssociationInitiator createNewAssociation(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, java.util.LinkedList presentationContexts, java.util.LinkedList scuSCPRoleSelections, boolean secureTransport) throws DicomNetworkException, java.io.IOException
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 associationcallingAETitle
- the AE Title of the local (our) end of the associationpresentationContexts
- a java.util.LinkedList of PresentationContext
objects, each of which contains an Abstract Syntax (SOP Class UID) and one or more Transfer SyntaxesscuSCPRoleSelections
- 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 supportedsecureTransport
- true if to use secure transport protocoljava.io.IOException
DicomNetworkException
- thrown for A-ASSOCIATE-RJ, A-ABORT and A-P-ABORT indicationspublic static com.pixelmed.network.AssociationInitiator createNewAssociation(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, java.util.LinkedList presentationContexts, java.util.LinkedList scuSCPRoleSelections, boolean secureTransport, java.lang.String username, java.lang.String password) throws DicomNetworkException, java.io.IOException
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 associationcallingAETitle
- the AE Title of the local (our) end of the associationpresentationContexts
- a java.util.LinkedList of PresentationContext
objects, each of which contains an Abstract Syntax (SOP Class UID) and one or more Transfer SyntaxesscuSCPRoleSelections
- 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 supportedsecureTransport
- true if to use secure transport protocolusername
- may be null if no user identitypassword
- may be null if no user identity or no password requiredjava.io.IOException
DicomNetworkException
- thrown for A-ASSOCIATE-RJ, A-ABORT and A-P-ABORT indicationspublic static int getDefaultMaximumLengthReceived()
Get the default Maximum PDU Size that we would like to receive.
public static int getDefaultReceiveBufferSize()
Get the default TCP socket receive buffer size to use to set the socket options.
public static int getDefaultSendBufferSize()
Get the default TCP socket send buffer size to use to set the socket options.