public class Request extends java.lang.Object implements ULServiceMessage
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.
Modifier and Type | Field and Description |
---|---|
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 |
ABORT, ASS_ACKNOWLEDGE, ASS_REJECT, ASS_REQUEST, DIMSE, REL_REQUEST, REL_RESPONSE
Constructor and Description |
---|
Request()
constructs an empty Request object.
|
Modifier and Type | Method and Description |
---|---|
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)
add a presentation context to the request.
|
void |
addPresentationContext(int id,
UIDEntry asentry,
UIDEntry[] tsentries)
Adds a presentation context to the request with the specified presentation context is, abstract syntax and
proposed transfer syntaxes
|
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
|
java.lang.String |
getMessageTypeName()
returns a name for the message type
|
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.
|
public static final int NO_SUPPORT_SCU_ROLE
public static final int SUPPORT_SCU_ROLE
public static final int NO_SUPPORT_SCP_ROLE
public static final int SUPPORT_SCP_ROLE
public static final int DEFAULT
protected JdtLogger log
public int getType()
public int getMessageType()
getMessageType
in interface ULServiceMessage
public java.lang.String getMessageTypeName()
ULServiceMessage
getMessageTypeName
in interface ULServiceMessage
public java.lang.String getCallingTitle()
public java.lang.String getCalledTitle()
public void setCalledTitle(java.lang.String calledtitle)
calledtitle
- the called titlepublic void setCallingTitle(java.lang.String callingtitle)
callingtitle
- the calling titlepublic java.lang.String getImplementationClassUID()
public java.lang.String getImplementationVersionName()
public void setImplementationClassUID(java.lang.String s)
s
- the implementation class UIDpublic void setImplementationVersionName(java.lang.String s)
s
- the implementation version namepublic int getMaxPduSize()
public void setMaxPduSize(int maxpdusize)
public void setMaxOperationsInvoked(int n)
n
- the maximum number of operations invokedpublic int getMaxOperationsInvoked()
public void setMaxOperationsPerformed(int n)
n
- the maximum number of operations performedpublic int getMaxOperationsPerformed()
public int getScuRole(int asid) throws IllegalValueException
asid
- the abstract syntaxIllegalValueException
- IllegalValueExceptionpublic int getScpRole(int asid) throws IllegalValueException
asid
- the abstract syntaxIllegalValueException
- IllegalValueExceptionpublic PresentationContext getPresentationContext(int index)
index
- the indexpublic PresentationContext findPresentationContext(int pcid)
pcid
- the presentation context ID (odd number between 1 and 255)public byte getPresentationContextID(int i)
i
- -public int getID(int i)
i
- the indexpublic int getPresentationContexts()
public UIDEntry getAbstractSyntax(int i)
i
- the indexpublic int getTransferSyntaxes(int i)
i
- the presentation context index.public UIDEntry getTransferSyntax(int i, int j)
i
- the presentation context indexj
- the transfer syntax indexpublic byte[] getExtendedNegotiationData(int i)
i
- the index of the presentation contextpublic ExtendedNegotiation[] getExtendedNegotiations()
public void setExtendedNegotiations(ExtendedNegotiation[] extendedNegotiations)
extendedNegotiations
- the array of ExtendedNegotiation objectspublic void addPresentationContext(int asid, int[] tsids) throws IllegalValueException
asid
- the abstract syntax (a com.archimed.dicom.SOPClass constant)tsids
- the transfer syntaxes (an array of com.archimed.dicom.TransferSyntax constants)IllegalValueException
- IllegalValueExceptionpublic void addPresentationContext(int id, int asid, int[] tsids) throws IllegalValueException
addPresentationContext(int, UIDEntry, UIDEntry[])
id
- the presentation context IDasid
- the abstract syntax constanttsids
- the transfer syntax constantsIllegalValueException
- IllegalValueExceptionpublic void addPresentationContext(int id, UIDEntry asentry, UIDEntry[] tsentries)
id
- the presentation context idasentry
- the abstract syntaxtsentries
- an array of transfer syntaxespublic void setExtendedNegotiationData(int index, byte[] data)
index
- the index of the presentation context.data
- the extended negotiation data (sop class specific)public void setScuScpRoleSelection(int asid, int scurole, int scprole) throws IllegalValueException
asid
- the abstract syntaxscurole
- the role as SCU
scprole
- the role as SCP
IllegalValueException
public UserIdentityNegotiationRequest getUserIdentityNegotiationRequest()
public void setUserIdentityNegotiationRequest(UserIdentityNegotiationRequest userIdentityNegotiationRequest)
public java.lang.String toString()
toString
in class java.lang.Object