org.dicom4j.network.dimse.messages
Class DimseMessageFactory

java.lang.Object
  extended by org.dicom4j.network.dimse.messages.DimseMessageFactory

public class DimseMessageFactory
extends Object

Factory to create DIMSE messages

Since:
0.0.0
Author:
Laurent Lecomte

Constructor Summary
DimseMessageFactory()
           
 
Method Summary
 byte createMessageID()
          Return a Message ID
 CCancelRequest newCCancelFindRequest()
          Create a new C-FIND-RSP MESSAGE
 CCancelRequest newCCancelFindRequest(CommandSet aCommandDataset)
          Create a new C-FIND-RSP MESSAGE
 CCancelRequest newCCancelRequest(int aMessageID)
          Creates a new CCancelRequest
 CEchoRequestMessage newCEchoRequest()
           
 CEchoRequestMessage newCEchoRequest(CommandSet aCommandSet)
          create a new CEchoRequest message from a CommandSet
 CEchoRequestMessage newCEchoRequest(SOPClass aSOPClass)
           
 CEchoRequestMessage newCEchoRequest(String aAffectedSOPClassUID)
          create a new CEchoRequest message
 CEchoResponseMessage newCEchoResponse(CommandSet aCommandSet)
          Create an new CEchoResponse message from a CommandSet
 CEchoResponseMessage newCEchoResponse(int messageIDBeingRespondedTo, String affectedSOPClassUID, DimseStatus aStatus)
           
 CEchoResponseMessage newCEchoResponse(int messageIDBeingRespondedTo, String affectedSOPClassUID, int status)
           
 CFindRequestMessage newCFindRequest(CommandSet aCommandDataset)
           
 CFindRequestMessage newCFindRequest(SOPClass aSOPClass)
           
 CFindRequestMessage newCFindRequest(String aAffectedSOPClassUID)
           
 CFindRequestMessage newCFindRequest(String aAffectedSOPClassUID, int Priority)
           
 CFindResponseMessage newCFindResponse(CommandSet aCommandDataset)
          Create a new CFindResponseMessage
 CFindResponseMessage newCFindResponse(int messageID, String affectedSOPClassUID)
          create new CFindResponseMessage with no DataSet, Success Status
 CFindResponseMessage newCFindResponse(int messageID, String affectedSOPClassUID, boolean hasDataset, DimseStatus status)
          create new CFindResponseMessage
 CFindResponseMessage newCFindResponse(int messageID, String affectedSOPClassUID, boolean aHasDataset, int status)
           
 CFindResponseMessage newCFindResponse(int aMessageID, String aAffectedSOPClassUID, int aHasDataset, int aStatus)
           
 CGetRequestMessage newCGetRequest(CommandSet aCommandDataset)
          creates new C-Get-Request message from a CommandDataset
 CGetRequestMessage newCGetRequest(String aAffectedSOPClassUID)
          creates new C-Get-Request messag
 CGetRequestMessage newCGetRequest(String aAffectedSOPClassUID, int Priority)
          creates new C-Get-Request messag
 CMoveRequestMessage newCMoveRequest(CommandSet aCommandDataset)
           
 CMoveResponseMessage newCMoveResponse(CommandSet aCommandDataset)
           
 CStoreRequestMessage newCStoreRequest()
           
 CStoreRequestMessage newCStoreRequest(CommandSet aCommandDataset)
           
 CStoreRequestMessage newCStoreRequest(String aAffectedSOPClassUID)
           
 CStoreRequestMessage newCStoreRequest(String aAffectedSOPClassUID, int aPriority)
           
 CStoreResponseMessage newCStoreResponseMessage(CommandSet aCommandSet)
          create a new CStoreResponseMessage
 CStoreResponseMessage newCStoreResponseMessage(int aMessageID, String aAffectedSOPClassUID, DimseStatus aStatus)
           
 CStoreResponseMessage newCStoreResponseMessage(int aMessageID, String aAffectedSOPClassUID, int aHasDataset, int aStatus)
          Deprecated. use others methods
 DimseMessage newMessage(CommandSet aCommandDataSet)
          Creates a new message from a CommandSet
 NActionRequest newNActionRequest(CommandSet aCommandSet)
           
 NActionRequest newNActionRequest(String aRequestedSOPClassUID)
          Create a new N-CREATE-RQ MESSAGE
 NActionRequest newNActionRequest(String aRequestedSOPClassUID, String aRequestedSOPInstanceUID)
           
 NActionResponse newNActionResponse(CommandSet aCommandDataSet)
           
 NActionResponse newNActionResponse(int aMessageID, String aAffectedSOPClassUID)
           
 NCreateRequest newNCreateRequest(CommandSet aCommandDataSet)
          Create a new N-CREATE-RQ MESSAGE from a CommandSet
 NCreateRequest newNCreateRequest(String aAffectedSOPClassUID)
          Create a new N-CREATE-RQ MESSAGE
 NCreateResponse newNCreateResponse(CommandSet aCommandDataSet)
           
 NCreateResponse newNCreateResponse(int aMessageID, String aAffectedSOPClassUID, int aStatus)
           
 NCreateResponse newNCreateResponse(int aMessageID, String aAffectedSOPClassUID, int aHasDataset, int aStatus)
           
 NCreateResponse newNCreateResponse(String aAffectedSOPClassUID, int aStatus)
           
 NDeleteRequest newNDeleteRequest(CommandSet aCommandSet)
           
 NDeleteRequest newNDeleteRequest(String aRequestedSOPClassUID)
           
 NDeleteRequest newNDeleteRequest(String aRequestedSOPClassUID, String aRequestedSOPInstanceUID)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DimseMessageFactory

public DimseMessageFactory()
Method Detail

createMessageID

public byte createMessageID()
Return a Message ID

Returns:
the message ID

newCCancelFindRequest

public CCancelRequest newCCancelFindRequest()
                                     throws DicomException
Create a new C-FIND-RSP MESSAGE

Returns:
the message
Throws:
DicomException

newCCancelFindRequest

public CCancelRequest newCCancelFindRequest(CommandSet aCommandDataset)
                                     throws DicomException
Create a new C-FIND-RSP MESSAGE

Parameters:
aCommandDataset -
Returns:
the message
Throws:
DicomException

newCCancelRequest

public CCancelRequest newCCancelRequest(int aMessageID)
                                 throws DicomException
Creates a new CCancelRequest

Parameters:
aMessageID - the MessageID
Returns:
the message
Throws:
DicomException

newCEchoRequest

public CEchoRequestMessage newCEchoRequest(CommandSet aCommandSet)
                                    throws DicomException
create a new CEchoRequest message from a CommandSet

Parameters:
aCommandSet - the CommandSet
Returns:
the message
Throws:
DicomException

newCEchoRequest

public CEchoRequestMessage newCEchoRequest()
                                    throws DicomException
Throws:
DicomException

newCEchoRequest

public CEchoRequestMessage newCEchoRequest(SOPClass aSOPClass)
                                    throws DicomException
Throws:
DicomException

newCEchoRequest

public CEchoRequestMessage newCEchoRequest(String aAffectedSOPClassUID)
                                    throws DicomException
create a new CEchoRequest message

Parameters:
aAffectedSOPClassUID - the AffectedSOPClassUID
Returns:
the message
Throws:
DicomException

newCEchoResponse

public CEchoResponseMessage newCEchoResponse(CommandSet aCommandSet)
Create an new CEchoResponse message from a CommandSet

Parameters:
aCommandSet - the CommandSet
Returns:
the created message
Throws:
DimseException

newCEchoResponse

public CEchoResponseMessage newCEchoResponse(int messageIDBeingRespondedTo,
                                             String affectedSOPClassUID,
                                             DimseStatus aStatus)
                                      throws DicomException
Throws:
DicomException

newCEchoResponse

public CEchoResponseMessage newCEchoResponse(int messageIDBeingRespondedTo,
                                             String affectedSOPClassUID,
                                             int status)
                                      throws DicomException
Throws:
DicomException

newCFindRequest

public CFindRequestMessage newCFindRequest(CommandSet aCommandDataset)
                                    throws DicomException
Throws:
DicomException

newCFindRequest

public CFindRequestMessage newCFindRequest(SOPClass aSOPClass)
                                    throws DicomException
Throws:
DicomException

newCFindRequest

public CFindRequestMessage newCFindRequest(String aAffectedSOPClassUID)
                                    throws DicomException
Throws:
DicomException

newCFindRequest

public CFindRequestMessage newCFindRequest(String aAffectedSOPClassUID,
                                           int Priority)
                                    throws DicomException
Throws:
DicomException

newCFindResponse

public CFindResponseMessage newCFindResponse(CommandSet aCommandDataset)
Create a new CFindResponseMessage

Parameters:
aCommandDataset - the command set
Returns:
the message

newCFindResponse

public CFindResponseMessage newCFindResponse(int messageID,
                                             String affectedSOPClassUID,
                                             boolean hasDataset,
                                             DimseStatus status)
                                      throws DicomException
create new CFindResponseMessage

Parameters:
messageID - the message ID
affectedSOPClassUID - the AffectedSOPClassUID
hasDataset - true is the message will contain a DataSet
status - the Priority
Returns:
the message
Throws:
DicomException
Since:
0.0.5

newCFindResponse

public CFindResponseMessage newCFindResponse(int messageID,
                                             String affectedSOPClassUID,
                                             boolean aHasDataset,
                                             int status)
                                      throws DicomException
Throws:
DicomException

newCFindResponse

public CFindResponseMessage newCFindResponse(int aMessageID,
                                             String aAffectedSOPClassUID,
                                             int aHasDataset,
                                             int aStatus)
                                      throws DicomException
Throws:
DicomException

newCFindResponse

public CFindResponseMessage newCFindResponse(int messageID,
                                             String affectedSOPClassUID)
                                      throws DicomException
create new CFindResponseMessage with no DataSet, Success Status

Parameters:
messageID - the message ID of the request message
affectedSOPClassUID - the affected sopClass UID
Returns:
the CFindResponseMessage
Throws:
DicomException - if errors occurs

newCGetRequest

public CGetRequestMessage newCGetRequest(CommandSet aCommandDataset)
                                  throws DicomException
creates new C-Get-Request message from a CommandDataset

Parameters:
aCommandDataset - the CommandDataset
Returns:
the new message
Throws:
DicomException - if errors ocurs

newCGetRequest

public CGetRequestMessage newCGetRequest(String aAffectedSOPClassUID)
                                  throws DicomException
creates new C-Get-Request messag

Parameters:
aAffectedSOPClassUID -
Returns:
the new message
Throws:
DicomException - if errors ocurs

newCGetRequest

public CGetRequestMessage newCGetRequest(String aAffectedSOPClassUID,
                                         int Priority)
                                  throws DicomException
creates new C-Get-Request messag

Parameters:
aAffectedSOPClassUID -
Priority -
Returns:
the new message
Throws:
DicomException - if errors ocurs

newCMoveRequest

public CMoveRequestMessage newCMoveRequest(CommandSet aCommandDataset)
                                    throws DicomException
Throws:
DicomException

newCMoveResponse

public CMoveResponseMessage newCMoveResponse(CommandSet aCommandDataset)
                                      throws DicomException
Throws:
DicomException

newCStoreRequest

public CStoreRequestMessage newCStoreRequest(CommandSet aCommandDataset)
                                      throws DicomException
Throws:
DicomException

newCStoreRequest

public CStoreRequestMessage newCStoreRequest()
                                      throws DicomException
Throws:
DicomException

newCStoreRequest

public CStoreRequestMessage newCStoreRequest(String aAffectedSOPClassUID)
                                      throws DicomException
Throws:
DicomException

newCStoreRequest

public CStoreRequestMessage newCStoreRequest(String aAffectedSOPClassUID,
                                             int aPriority)
                                      throws DicomException
Throws:
DicomException

newCStoreResponseMessage

public CStoreResponseMessage newCStoreResponseMessage(CommandSet aCommandSet)
                                               throws DicomException
create a new CStoreResponseMessage

Parameters:
aCommandSet - the CommandSet
Returns:
the message
Throws:
DicomException

newCStoreResponseMessage

public CStoreResponseMessage newCStoreResponseMessage(int aMessageID,
                                                      String aAffectedSOPClassUID,
                                                      DimseStatus aStatus)
                                               throws DimseException,
                                                      DicomException
Throws:
DimseException
DicomException

newCStoreResponseMessage

public CStoreResponseMessage newCStoreResponseMessage(int aMessageID,
                                                      String aAffectedSOPClassUID,
                                                      int aHasDataset,
                                                      int aStatus)
                                               throws DicomException
Deprecated. use others methods

Parameters:
aMessageID -
aAffectedSOPClassUID -
aHasDataset -
aStatus -
Returns:
Throws:
DicomException

newMessage

public DimseMessage newMessage(CommandSet aCommandDataSet)
                        throws DicomException
Creates a new message from a CommandSet

Parameters:
aCommandDataSet - the CommandSet
Returns:
the created CommandSet
Throws:
DicomException - if error occurs

newNActionRequest

public NActionRequest newNActionRequest(CommandSet aCommandSet)
                                 throws DicomException
Throws:
DicomException

newNActionRequest

public NActionRequest newNActionRequest(String aRequestedSOPClassUID)
                                 throws DicomException
Create a new N-CREATE-RQ MESSAGE

Parameters:
aAffectedSOPClassUID -
Returns:
Throws:
DicomException

newNActionRequest

public NActionRequest newNActionRequest(String aRequestedSOPClassUID,
                                        String aRequestedSOPInstanceUID)
                                 throws DicomException
Throws:
DicomException

newNActionResponse

public NActionResponse newNActionResponse(CommandSet aCommandDataSet)
                                   throws DimseException,
                                          DicomException
Throws:
DimseException
DicomException

newNActionResponse

public NActionResponse newNActionResponse(int aMessageID,
                                          String aAffectedSOPClassUID)
                                   throws DicomException
Throws:
DicomException

newNCreateRequest

public NCreateRequest newNCreateRequest(CommandSet aCommandDataSet)
                                 throws DicomException
Create a new N-CREATE-RQ MESSAGE from a CommandSet

Parameters:
aCommandDataset -
Returns:
the message
Throws:
DicomException

newNCreateRequest

public NCreateRequest newNCreateRequest(String aAffectedSOPClassUID)
                                 throws DicomException
Create a new N-CREATE-RQ MESSAGE

Parameters:
aAffectedSOPClassUID -
Returns:
Throws:
DicomException

newNCreateResponse

public NCreateResponse newNCreateResponse(CommandSet aCommandDataSet)
                                   throws DimseException,
                                          DicomException
Throws:
DimseException
DicomException

newNCreateResponse

public NCreateResponse newNCreateResponse(int aMessageID,
                                          String aAffectedSOPClassUID,
                                          int aStatus)
                                   throws DimseException,
                                          DicomException
Throws:
DimseException
DicomException

newNCreateResponse

public NCreateResponse newNCreateResponse(int aMessageID,
                                          String aAffectedSOPClassUID,
                                          int aHasDataset,
                                          int aStatus)
                                   throws DicomException
Throws:
DicomException

newNCreateResponse

public NCreateResponse newNCreateResponse(String aAffectedSOPClassUID,
                                          int aStatus)
                                   throws DimseException,
                                          DicomException
Throws:
DimseException
DicomException

newNDeleteRequest

public NDeleteRequest newNDeleteRequest(CommandSet aCommandSet)
                                 throws DicomException
Throws:
DicomException

newNDeleteRequest

public NDeleteRequest newNDeleteRequest(String aRequestedSOPClassUID)
                                 throws DicomException
Throws:
DicomException

newNDeleteRequest

public NDeleteRequest newNDeleteRequest(String aRequestedSOPClassUID,
                                        String aRequestedSOPInstanceUID)
                                 throws DicomException
Throws:
DicomException


Copyright © 2009 dicom4j. All Rights Reserved.