Trispark JDT
2.50.13

com.archimed.dicom.network
Class Acknowledge

java.lang.Object
  extended by com.archimed.dicom.network.Response
      extended by com.archimed.dicom.network.Acknowledge
All Implemented Interfaces:
ULServiceMessage

public class Acknowledge
extends Response
implements ULServiceMessage

represents an associate acknowledge message. In particular, it contains all the presentation contexts contained in the acknowledge. The presentation contexts are indexed from zero to the number of presentation contexts minus one. This index is NOT the presentation context ID: an odd number between 1 and 255 specified with every negotiated presentation context and used to identify in the association the currently used presentation context to which a DIMSE message applies.

When creating new Acknowledge object for sending, the implementation class UID and implementation version name are initialized from the constants defined in the com.archimed.dicom.Jdt class.

Since:
1.00

Field Summary
static int ABSTRACT_SYNTAX_NOT_SUPPORTED
           
static int ACCEPTANCE
           
static int DEFAULT
           
protected  JdtLogger log
           
static int NO_REASON
           
static int NO_SUPPORT_SCP_ROLE
           
static int NO_SUPPORT_SCU_ROLE
           
static int SUPPORT_SCP_ROLE
           
static int SUPPORT_SCU_ROLE
           
static int TRANSFER_SYNTAXES_NOT_SUPPORTED
           
static int USER_REJECTION
           
 
Fields inherited from interface com.archimed.dicom.network.ULServiceMessage
ABORT, ASS_ACKNOWLEDGE, ASS_REJECT, ASS_REQUEST, DIMSE, REL_REQUEST, REL_RESPONSE
 
Constructor Summary
Acknowledge()
           
 
Method Summary
 void addPresentationContext(byte id, int result, int tsid)
          Deprecated. This method is replaced by addPresentationContext(int id,int result,int tsid).
 void addPresentationContext(int id, int result, int tsid)
          add a new presentation context to the Acknowledge object.
 PresentationContext findPresentationContext(int pcid)
          returns the presentation context based on the presentation context ID
 java.lang.String getCalledTitle()
          returns the called application entity title
 java.lang.String getCallingTitle()
          returns the calling application entity title
 ExtendedNegotiation[] getExtendedNegotiations()
          returns the array of ExtendedNegotation objects.
 int getID(int index)
          returns the presentation context id of the presentation context with the specified index.
 java.lang.String getImplementationClassUID()
          returns the implementation class uid
 java.lang.String getImplementationVersionName()
          returns the implementation version name
 int getMaxOperationsInvoked()
          returns the maximum number op outstanding operations that the requester is allowed to invoke.
 int getMaxOperationsPerformed()
          returns the maximum number of outstanding operations the requester is allowed to perform assynchronously.
 int getMaxPduSize()
          returns the maximum pdu size specified in the maximum PDU length subitem of this acknowledge.
 int getMessageType()
          returns the type of ULServiceMessage
 PresentationContext getPresentationContext(int index)
          gets the presentation context at index i
 byte getPresentationContextID(int index)
          Deprecated. This method is replaced by getID(int index).
 int getPresentationContexts()
          returns the number of Presentation contexts in the Acknowledge
 int getResult(int index)
          returns the result of the presentation context with the specified index.
 int getScpRole(int asid)
          returns if the receiver supports the role of SCP for the specified abstract syntax.
 int getScuRole(int asid)
          returns if the receiver supports the role of SCU for the specified abstract syntax.
 UIDEntry getTransferSyntax(int index)
          returns the accepted transfer syntax for the presentation context with the specified index.
 int getType()
          returns the type of this pdu
 UserIdentityNegotiationResponse getUserIdentityNegotiationResponse()
          Returns the user identity negotiation data.
 void setCalledTitle(java.lang.String calledtitle)
          sets the called application entity title
 void setCallingTitle(java.lang.String callingtitle)
          sets the calling application entity title
 void setExtendedNegotiations(ExtendedNegotiation[] extendedNegotiations)
          sets the array of extended negotiations.
 void setImplementationClassUID(java.lang.String s)
          sets the implementation class UID in this Acknowledge.
 void setImplementationVersionName(java.lang.String s)
          sets the implementation version name in this Acknowledge.
 void setMaxOperationsInvoked(int n)
          sets the maximum number of outstanding operations that the requester is allowed to invoke assychronously.
 void setMaxOperationsPerformed(int n)
          sets the maximum of outstanding operations the requester is allowed to perform assynchronously.
 void setMaxPduSize(int maxpdusize)
          sets the maximum pdu size specified in the maximum PDU length subitem of this acknowledge.
 void setScuScpRoleSelection(int asid, int scurole, int scprole)
          sets the SCU role and SCP role for the specified abstract syntax.
 void setUserIdentityNegotiationResponse(UserIdentityNegotiationResponse userIdentityNegotiationResponse)
          Updates the user identity negotiation data.
 java.lang.String toString()
          returns a String representation of this Acknowledge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_SUPPORT_SCU_ROLE

public static final int NO_SUPPORT_SCU_ROLE
See Also:
Constant Field Values

SUPPORT_SCU_ROLE

public static final int SUPPORT_SCU_ROLE
See Also:
Constant Field Values

NO_SUPPORT_SCP_ROLE

public static final int NO_SUPPORT_SCP_ROLE
See Also:
Constant Field Values

SUPPORT_SCP_ROLE

public static final int SUPPORT_SCP_ROLE
See Also:
Constant Field Values

DEFAULT

public static final int DEFAULT
See Also:
Constant Field Values

ACCEPTANCE

public static final int ACCEPTANCE
See Also:
Constant Field Values

USER_REJECTION

public static final int USER_REJECTION
See Also:
Constant Field Values

NO_REASON

public static final int NO_REASON
See Also:
Constant Field Values

ABSTRACT_SYNTAX_NOT_SUPPORTED

public static final int ABSTRACT_SYNTAX_NOT_SUPPORTED
See Also:
Constant Field Values

TRANSFER_SYNTAXES_NOT_SUPPORTED

public static final int TRANSFER_SYNTAXES_NOT_SUPPORTED
See Also:
Constant Field Values

log

protected JdtLogger log
Constructor Detail

Acknowledge

public Acknowledge()
Method Detail

getType

public int getType()
returns the type of this pdu

Returns:
Pdu.A_ASSOCIATE_AC

getMessageType

public int getMessageType()
returns the type of ULServiceMessage

Specified by:
getMessageType in interface ULServiceMessage
Returns:
ULServiceMessage.ASS_ACKNOWLEDGE

getCallingTitle

public java.lang.String getCallingTitle()
returns the calling application entity title


getCalledTitle

public java.lang.String getCalledTitle()
returns the called application entity title


setCalledTitle

public void setCalledTitle(java.lang.String calledtitle)
sets the called application entity title

Parameters:
calledtitle -

setCallingTitle

public void setCallingTitle(java.lang.String callingtitle)
sets the calling application entity title

Parameters:
callingtitle -

getImplementationClassUID

public java.lang.String getImplementationClassUID()
returns the implementation class uid


getImplementationVersionName

public java.lang.String getImplementationVersionName()
returns the implementation version name


setImplementationClassUID

public void setImplementationClassUID(java.lang.String s)
sets the implementation class UID in this Acknowledge. This will override the value specified in the Jdt class.

Parameters:
s -

setImplementationVersionName

public void setImplementationVersionName(java.lang.String s)
sets the implementation version name in this Acknowledge. This will override the value specified in the Jdt class.

Parameters:
s -

getMaxPduSize

public int getMaxPduSize()
returns the maximum pdu size specified in the maximum PDU length subitem of this acknowledge.


setMaxPduSize

public void setMaxPduSize(int maxpdusize)
sets the maximum pdu size specified in the maximum PDU length subitem of this acknowledge.


setMaxOperationsInvoked

public void setMaxOperationsInvoked(int n)
sets the maximum number of outstanding operations that the requester is allowed to invoke assychronously. This must be less than the value proposed. The use of this method is optional.

Parameters:
n -

getMaxOperationsInvoked

public int getMaxOperationsInvoked()
returns the maximum number op outstanding operations that the requester is allowed to invoke.


setMaxOperationsPerformed

public void setMaxOperationsPerformed(int n)
sets the maximum of outstanding operations the requester is allowed to perform assynchronously. The use of this method is optional.

Parameters:
n -

getMaxOperationsPerformed

public int getMaxOperationsPerformed()
returns the maximum number of outstanding operations the requester is allowed to perform assynchronously.


setScuScpRoleSelection

public void setScuScpRoleSelection(int asid,
                                   int scurole,
                                   int scprole)
                            throws IllegalValueException
sets the SCU role and SCP role for the specified abstract syntax. The use of this method is optional. Defaults apply if not used.

Parameters:
asid - the abstract syntax
scurole - the role as SCU
  • NO_SUPPORT_SCU_ROLE
  • SUPPORT_SCU_ROLE
  • DEFAULT
scprole - the role as SCP
  • NO_SUPPORT_SCP_ROLE
  • SUPPORT_SCP_ROLE
  • DEFAULT
Throws:
IllegalValueException

getScuRole

public int getScuRole(int asid)
               throws IllegalValueException
returns if the receiver supports the role of SCU for the specified abstract syntax.

Parameters:
asid - the abstract syntax
Returns:
one of
  • NO_SUPPORT_SCU_ROLE
  • SUPPORT_SCU_ROLE
  • DEFAULT : the acknowledge does not contain SCU/SCP role selection negotiation for the specified abstract syntax, defaults apply.
Throws:
IllegalValueException

getScpRole

public int getScpRole(int asid)
               throws IllegalValueException
returns if the receiver supports the role of SCP for the specified abstract syntax.

Parameters:
asid - the abstract syntax
Returns:
one of
  • NO_SUPPORT_SCP_ROLE
  • SUPPORT_SCP_ROLE
  • DEFAULT : the acknowledge does not contain SCU/SCP role selection negotiation for the specified abstract syntax, defaults apply.
Throws:
IllegalValueException

getExtendedNegotiations

public ExtendedNegotiation[] getExtendedNegotiations()
returns the array of ExtendedNegotation objects. If there are no abstract syntaxes with extended negotiation data, this method will return an array of zero length.


setExtendedNegotiations

public void setExtendedNegotiations(ExtendedNegotiation[] extendedNegotiations)
sets the array of extended negotiations. If there are no abstract syntaxes for which there is extended negotiation data, this method does not have to be used.

Parameters:
extendedNegotiations - the array of ExtendedNegotiation objects

getPresentationContext

public PresentationContext getPresentationContext(int index)
gets the presentation context at index i

Parameters:
index -
Returns:
the presentation context

findPresentationContext

public PresentationContext findPresentationContext(int pcid)
returns the presentation context based on the presentation context ID

Parameters:
pcid - the presentation context ID (odd number between 1 and 255)

getPresentationContextID

public byte getPresentationContextID(int index)
Deprecated. This method is replaced by getID(int index).


getID

public int getID(int index)
returns the presentation context id of the presentation context with the specified index.

Parameters:
index -
Returns:
getPresentationContext(index).getID()

getResult

public int getResult(int index)
returns the result of the presentation context with the specified index. Internally calls getPresentationContext(index).getResult() .

Parameters:
index -
Returns:
the return value is one of
  • ACCEPTANCE
  • USER_REJECTION
  • NO_REASON
  • ABSTRACT_SYNTAX_NOT_SUPPORTED
  • TRANSFER_SYNTAXES_NOT_SUPPORTED

getPresentationContexts

public int getPresentationContexts()
returns the number of Presentation contexts in the Acknowledge


getTransferSyntax

public UIDEntry getTransferSyntax(int index)
returns the accepted transfer syntax for the presentation context with the specified index.

Parameters:
i -
Returns:
getPresentationContext(index).getAcceptedTS();

addPresentationContext

public void addPresentationContext(byte id,
                                   int result,
                                   int tsid)
                            throws IllegalValueException
Deprecated. This method is replaced by addPresentationContext(int id,int result,int tsid).

Throws:
IllegalValueException

addPresentationContext

public void addPresentationContext(int id,
                                   int result,
                                   int tsid)
                            throws IllegalValueException
add a new presentation context to the Acknowledge object.

Parameters:
id - the presentation context ID (an odd number between 1 and 255)
result - one of:
  • ACCEPTANCE
  • USER_REJECTION
  • NO_REASON
  • ABSTRACT_SYNTAX_NOT_SUPPORTED
  • TRANSFER_SYNTAXES_NOT_SUPPORTED
tsid - the transfer syntax (relevant if result is ACCEPTANCE, a com.archimed.dicom.TransferSyntax constant)
Throws:
IllegalValueException

getUserIdentityNegotiationResponse

public UserIdentityNegotiationResponse getUserIdentityNegotiationResponse()
Returns the user identity negotiation data. If this data was not present in the byte representation of this acknowledge, this will return null.


setUserIdentityNegotiationResponse

public void setUserIdentityNegotiationResponse(UserIdentityNegotiationResponse userIdentityNegotiationResponse)
Updates the user identity negotiation data. If this data is not needed in the byte representation of this acknowledge, pass null to this method.


toString

public java.lang.String toString()
returns a String representation of this Acknowledge

Overrides:
toString in class java.lang.Object

Trispark JDT
2.50.13

Copyright © 1999-2008 Trispark. All Rights Reserved.