Package com.pixelmed.network
Class AssociationFactory
- java.lang.Object
-
- com.pixelmed.network.AssociationFactory
-
public class AssociationFactory extends java.lang.Object
A factory object of static methods that can accept and initiate associations.
-
-
Constructor Summary
Constructors Constructor Description AssociationFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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, int debugLevel)
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, int debugLevel)
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, int debugLevel)
Opens a transport connection and initiates an association.static com.pixelmed.network.AssociationAcceptor
createNewAssociation(java.net.Socket socket, java.lang.String calledAETitle, int debugLevel)
Accepts an association on the supplied open transport connection.static com.pixelmed.network.AssociationAcceptor
createNewAssociation(java.net.Socket socket, java.lang.String calledAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, int debugLevel)
Accepts an association on the supplied open transport connection.static com.pixelmed.network.AssociationAcceptor
createNewAssociation(java.net.Socket socket, java.lang.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(java.net.Socket socket, java.lang.String calledAETitle, PresentationContextSelectionPolicy presentationContextSelectionPolicy, int debugLevel)
Accepts an association on the supplied open transport connection.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.
-
-
-
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(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, int debugLevel) throws DicomNetworkException, java.io.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 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 ofPresentationContext
objects, each of which contains an Abstract Syntax (SOP Class UID) and one or more Transfer SyntaxesscuSCPRoleSelections
- a java.util.LinkedList ofSCUSCPRoleSelection
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 requireddebugLevel
- 0 for no debugging, > 0 for increasingly verbose debugging- Returns:
- an open association in state 6 - Data Transfer
- Throws:
java.io.IOException
DicomNetworkException
- thrown for A-ASSOCIATE-RJ, A-ABORT and A-P-ABORT indications
-
createNewAssociation
public 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, int debugLevel) throws DicomNetworkException, java.io.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 associationcallingAETitle
- the AE Title of the local (our) end of the associationpresentationContexts
- a java.util.LinkedList ofPresentationContext
objects, each of which contains an Abstract Syntax (SOP Class UID) and one or more Transfer SyntaxesscuSCPRoleSelections
- a java.util.LinkedList ofSCUSCPRoleSelection
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 protocoldebugLevel
- 0 for no debugging, > 0 for increasingly verbose debugging- Returns:
- an open association in state 6 - Data Transfer
- Throws:
java.io.IOException
DicomNetworkException
- thrown for A-ASSOCIATE-RJ, A-ABORT and A-P-ABORT indications
-
createNewAssociation
public 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, int debugLevel) throws DicomNetworkException, java.io.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 associationcallingAETitle
- the AE Title of the local (our) end of the associationpresentationContexts
- a java.util.LinkedList ofPresentationContext
objects, each of which contains an Abstract Syntax (SOP Class UID) and one or more Transfer SyntaxesscuSCPRoleSelections
- a java.util.LinkedList ofSCUSCPRoleSelection
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 requireddebugLevel
- 0 for no debugging, > 0 for increasingly verbose debugging- Returns:
- an open association in state 6 - Data Transfer
- Throws:
java.io.IOException
DicomNetworkException
- thrown for A-ASSOCIATE-RJ, A-ABORT and A-P-ABORT indications
-
createNewAssociation
public static com.pixelmed.network.AssociationAcceptor createNewAssociation(java.net.Socket socket, java.lang.String calledAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, int debugLevel) throws DicomNetworkException, java.io.IOException
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 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 defaultdebugLevel
- 0 for no debugging, > 0 for increasingly verbose debugging- Returns:
- an open association in state 6 - Data Transfer
- Throws:
java.io.IOException
DicomNetworkException
- thrown for A-ABORT and A-P-ABORT indications
-
createNewAssociation
public static com.pixelmed.network.AssociationAcceptor createNewAssociation(java.net.Socket socket, java.lang.String calledAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, PresentationContextSelectionPolicy presentationContextSelectionPolicy, int debugLevel) throws DicomNetworkException, java.io.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 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 rejectdebugLevel
- 0 for no debugging, > 0 for increasingly verbose debugging- Returns:
- an open association in state 6 - Data Transfer
- Throws:
java.io.IOException
DicomNetworkException
- thrown for A-ABORT and A-P-ABORT indications
-
createNewAssociation
public static com.pixelmed.network.AssociationAcceptor createNewAssociation(java.net.Socket socket, java.lang.String calledAETitle, PresentationContextSelectionPolicy presentationContextSelectionPolicy, int debugLevel) throws DicomNetworkException, java.io.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 acceptedcalledAETitle
- the AE Title of the local (our) end of the associationpresentationContextSelectionPolicy
- which SOP Classes and Transfer Syntaxes to accept and rejectdebugLevel
- 0 for no debugging, > 0 for increasingly verbose debugging- Returns:
- an open association in state 6 - Data Transfer
- Throws:
java.io.IOException
DicomNetworkException
- thrown for A-ABORT and A-P-ABORT indications
-
createNewAssociation
public static com.pixelmed.network.AssociationAcceptor createNewAssociation(java.net.Socket socket, java.lang.String calledAETitle, int debugLevel) throws DicomNetworkException, java.io.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. The default UnencapsulatedExplicitStoreFindMoveGetPresentationContextSelectionPolicy is used.- Parameters:
socket
- already open transport connection on which the association is to be acceptedcalledAETitle
- the AE Title of the local (our) end of the associationdebugLevel
- 0 for no debugging, > 0 for increasingly verbose debugging- Returns:
- an open association in state 6 - Data Transfer
- Throws:
java.io.IOException
DicomNetworkException
- thrown for A-ABORT and A-P-ABORT indications
-
-