Trispark JDT
2.50.13

com.archimed.dicom.network
Class Request

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

public class Request
extends java.lang.Object
implements ULServiceMessage

represents an associate request message. It contains all the relevant parameters of an association request. The Request object provides access to:

The presentation contexts are numbered from zero to the number of presentation contexts minus one. The total number of presentation contexts in the request is obtained with getPresentationContexts(). 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 a new Request 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 DEFAULT
           
protected  JdtLogger log
           
static int NO_SUPPORT_SCP_ROLE
           
static int NO_SUPPORT_SCU_ROLE
           
static int SUPPORT_SCP_ROLE
           
static int SUPPORT_SCU_ROLE
           
 
Fields inherited from interface com.archimed.dicom.network.ULServiceMessage
ABORT, ASS_ACKNOWLEDGE, ASS_REJECT, ASS_REQUEST, DIMSE, REL_REQUEST, REL_RESPONSE
 
Constructor Summary
Request()
          constructs an empty Request object.
 
Method Summary
 void addPresentationContext(int asid, int[] tsids)
          adds an abstract syntax - transfer syntaxes combination to the proposed presentation contexts.
 void addPresentationContext(int id, int asid, int[] tsids)
          Document it !
 void addPresentationContext(int id, UIDEntry asentry, UIDEntry[] tsentries)
          TODO Document it !
 PresentationContext findPresentationContext(int pcid)
          returns the presentation context based on the presentation context ID
 UIDEntry getAbstractSyntax(int i)
          returns the proposed abstract syntax at the specified index.
 java.lang.String getCalledTitle()
          returns the called application entity title of this request
 java.lang.String getCallingTitle()
          returns the calling application entity title of this request
 byte[] getExtendedNegotiationData(int i)
          Deprecated. returns extended negotiation data for the presentation context at the specified index or null if there is no extended negotiation for that presentation context.Use instead getExtendedNegotiations()
 ExtendedNegotiation[] getExtendedNegotiations()
          returns the array of ExtendedNegotation objects.
 int getID(int i)
          returns the presentation context ID of presentation context at the specified index.
 java.lang.String getImplementationClassUID()
          returns the Implementation Class UID of this request.
 java.lang.String getImplementationVersionName()
          returns the Implementation Version Name of this request.
 int getMaxOperationsInvoked()
          returns the maximum number op outstanding operations that the requester is willing to invoke assynchronously.
 int getMaxOperationsPerformed()
          returns the maximum number of outstanding operations the requester is willing to perform assynchronously.
 int getMaxPduSize()
          returns the maximum pdu size specified in the maximum PDU length subitem of this request.
 int getMessageType()
          returns the type of ULServiceMessage
 PresentationContext getPresentationContext(int index)
          get the presentation context at index i
 byte getPresentationContextID(int i)
          Deprecated. This method is replaced by getID
 int getPresentationContexts()
          returns the number of presentation contexts proposed in the request.
 int getScpRole(int asid)
          returns if the requester supports the role of SCP for the specified abstract syntax.
 int getScuRole(int asid)
          returns if the requester supports the role of SCU for the specified abstract syntax.
 UIDEntry getTransferSyntax(int i, int j)
          returns the proposed transfer syntax for the specified presentation context index and transfer syntax index.
 int getTransferSyntaxes(int i)
          returns the number of proposed transfer syntaxes for presentation context with the specified index.
 int getType()
          returns the type of Pdu
 UserIdentityNegotiationRequest getUserIdentityNegotiationRequest()
          Returns the user identity negotiation data.
 void setCalledTitle(java.lang.String calledtitle)
          sets the called application entity title of this request.
 void setCallingTitle(java.lang.String callingtitle)
          sets the calling application entity title of this request.
 void setExtendedNegotiationData(int index, byte[] data)
          Deprecated. sets the extended negotiation data for the specified presentation context. If there is no extended negotiation data for this presentation context, this method does not have to be used. Use instead setExtendedNegotiations()
 void setExtendedNegotiations(ExtendedNegotiation[] extendedNegotiations)
          sets the array of extended negotiations.
 void setImplementationClassUID(java.lang.String s)
          sets the implementation class uid for this particular Requesst.
 void setImplementationVersionName(java.lang.String s)
          Sets the implementation version name for this particular Request.
 void setMaxOperationsInvoked(int n)
          sets the maximum number of outstanding operations that the requester is willing to invoke assynchronously.
 void setMaxOperationsPerformed(int n)
          sets the maximum of outstanding operations the requester is willing to perform assynchronously.
 void setMaxPduSize(int maxpdusize)
          sets the maximum pdu size specified in the maximum PDU length subitem of this request.
 void setScuScpRoleSelection(int asid, int scurole, int scprole)
          sets the SCU role and SCP role for the specified abstract syntax.
 void setUserIdentityNegotiationRequest(UserIdentityNegotiationRequest userIdentityNegotiationRequest)
          Updatess the user identity negotiation data.
 java.lang.String toString()
          returns a String representation of this Request.
 
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

log

protected JdtLogger log
Constructor Detail

Request

public Request()
constructs an empty Request object.

Method Detail

getType

public int getType()
returns the type of Pdu

Returns:
Pdu.A_ASSOCIATE_RQ

getMessageType

public int getMessageType()
returns the type of ULServiceMessage

Specified by:
getMessageType in interface ULServiceMessage
Returns:

getCallingTitle

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


getCalledTitle

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


setCalledTitle

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

Parameters:
calledtitle -

setCallingTitle

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

Parameters:
callingtitle -

getImplementationClassUID

public java.lang.String getImplementationClassUID()
returns the Implementation Class UID of this request.


getImplementationVersionName

public java.lang.String getImplementationVersionName()
returns the Implementation Version Name of this request.


setImplementationClassUID

public void setImplementationClassUID(java.lang.String s)
sets the implementation class uid for this particular Requesst. This will override the value stored in the Jdt class.

Parameters:
s -

setImplementationVersionName

public void setImplementationVersionName(java.lang.String s)
Sets the implementation version name for this particular Request. This will override the value stored in the Jdt class.

Parameters:
s -

getMaxPduSize

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


setMaxPduSize

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


setMaxOperationsInvoked

public void setMaxOperationsInvoked(int n)
sets the maximum number of outstanding operations that the requester is willing to invoke assynchronously. The use of this method is optional.

Parameters:
n -

getMaxOperationsInvoked

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


setMaxOperationsPerformed

public void setMaxOperationsPerformed(int n)
sets the maximum of outstanding operations the requester is willing 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 willing to perform assynchronously.


getScuRole

public int getScuRole(int asid)
               throws IllegalValueException
returns if the requester 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 request 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 requester 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 request does not contain SCU/SCP role selection negotiation for the specified abstract syntax, defaults apply.
Throws:
IllegalValueException

getPresentationContext

public PresentationContext getPresentationContext(int index)
get 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)
Returns:

getPresentationContextID

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

Parameters:
i - -

getID

public int getID(int i)
returns the presentation context ID of presentation context at the specified index. This should be an odd number between 1 and 255.

Parameters:
i -
Returns:
an odd number between 1 and 255

getPresentationContexts

public int getPresentationContexts()
returns the number of presentation contexts proposed in the request.


getAbstractSyntax

public UIDEntry getAbstractSyntax(int i)
returns the proposed abstract syntax at the specified index.

Parameters:
i -

getTransferSyntaxes

public int getTransferSyntaxes(int i)
returns the number of proposed transfer syntaxes for presentation context with the specified index.

Parameters:
i - the presentation context index.

getTransferSyntax

public UIDEntry getTransferSyntax(int i,
                                  int j)
returns the proposed transfer syntax for the specified presentation context index and transfer syntax index.

Parameters:
i - the presentation context index
j - the transfer syntax index

getExtendedNegotiationData

public byte[] getExtendedNegotiationData(int i)
Deprecated. returns extended negotiation data for the presentation context at the specified index or null if there is no extended negotiation for that presentation context.Use instead getExtendedNegotiations()

Parameters:
i - the index of the presentation context

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

addPresentationContext

public void addPresentationContext(int asid,
                                   int[] tsids)
                            throws IllegalValueException
adds an abstract syntax - transfer syntaxes combination to the proposed presentation contexts. Generation of correct presentation context IDs (odd numbers between 0 and 255) is handled internally. The presentation context id's are generated in the order the presentation contexts are added, starting from 1. The first presentation context will have id 1,the next 3 and so on.

Parameters:
asid - the abstract syntax (a com.archimed.dicom.SOPClass constant)
tsids - the transfer syntaxes (an array of com.archimed.dicom.TransferSyntax constants)
Throws:
IllegalValueException

addPresentationContext

public void addPresentationContext(int id,
                                   int asid,
                                   int[] tsids)
                            throws IllegalValueException
Document it !

Parameters:
id -
asid -
tsids -
Throws:
IllegalValueException

addPresentationContext

public void addPresentationContext(int id,
                                   UIDEntry asentry,
                                   UIDEntry[] tsentries)
TODO Document it !


setExtendedNegotiationData

public void setExtendedNegotiationData(int index,
                                       byte[] data)
Deprecated. sets the extended negotiation data for the specified presentation context. If there is no extended negotiation data for this presentation context, this method does not have to be used. Use instead setExtendedNegotiations()

Parameters:
index - the index of the presentation context.
data - the extended negotiation data (sop class specific)

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

getUserIdentityNegotiationRequest

public UserIdentityNegotiationRequest getUserIdentityNegotiationRequest()
Returns the user identity negotiation data. If this data was not present in the byte representation, this will return null.


setUserIdentityNegotiationRequest

public void setUserIdentityNegotiationRequest(UserIdentityNegotiationRequest userIdentityNegotiationRequest)
Updatess the user identity negotiation data. If this data is not needed in the byte representation of this request, pass null to this method.


toString

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

Overrides:
toString in class java.lang.Object

Trispark JDT
2.50.13

Copyright © 1999-2008 Trispark. All Rights Reserved.