cdac.medinfo.sdk.hl7282.hl7net.auxiliaryprotocol.querycancel

## Class ClientSideQCNAgent

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.hl7net.auxiliaryprotocol.querycancel.ClientSideQCNAgent

- All Implemented Interfaces:
    IClientQueryCancellation

      public class ClientSideQCNAgent
      extends java.lang.Object
      implements IClientQueryCancellation

  This class provides the Cancellation Message against the Query Message, if user has set the Agent.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientSideQCNAgent()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ISegmentSet` | `generateCancellationQuery(java.lang.String strQueryId)` This method will generate segment set for QCN^J01.
    `ISingleCollection<ISegmentSet>` | `getCancelledMessages()` This method returns the Collection of Segment Set which are canceled by user.
    `ISingleCollection<java.lang.String>` | `getCancelledQueries()` This method will return all collection of query id for which cancellation query is triggered.
    `boolean` | `processReceive(ISegmentSet objSegmentSet)` This method keeps track for the Responses received.
    `boolean` | `processSend(ISegmentSet objSegmentSet)` This method will process the sending queries by client.
    `void` | `setStoreCancelledMessage(boolean bStoreCancelledMessage)` This will set the status whether to store canceled response messages or not.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ClientSideQCNAgent

          public ClientSideQCNAgent()

  - ### Method Detail

    - #### processSend

          public boolean processSend(ISegmentSet objSegmentSet)

      This method will process the sending queries by client. This will keeps track for Query Id and for Canceled query.
      Specified by:
        `processSend` in interface `IClientQueryCancellation`
      Parameters:
        `objSegmentSet` - Object of Segment set send by Client.
      Returns:
        boolean - This will return if received Segment Set is invalid.

    - #### getCancelledMessages

          public ISingleCollection<ISegmentSet> getCancelledMessages()

      This method returns the Collection of Segment Set which are canceled by user.
      Specified by:
        `getCancelledMessages` in interface `IClientQueryCancellation`
      Returns:
        ISingleCollection Collection of Segment Set.

    - #### getCancelledQueries

          public ISingleCollection<java.lang.String> getCancelledQueries()

      This method will return all collection of query id for which cancellation query is triggered.
      Specified by:
        `getCancelledQueries` in interface `IClientQueryCancellation`
      Returns:
        ISingleCollection collection of Query id.

    - #### processReceive

          public boolean processReceive(ISegmentSet objSegmentSet)

      This method keeps track for the Responses received. This also checks that received Segment set is canceled response. if it is store it in Collection.
      Specified by:
        `processReceive` in interface `IClientQueryCancellation`
      Parameters:
        `objSegmentSet` - Object of Segment set received to client.
      Returns:
        boolean - true if received Segment set is canceled else false.

    - #### setStoreCancelledMessage

          public void setStoreCancelledMessage(boolean bStoreCancelledMessage)

      This will set the status whether to store canceled response messages or not.
      Specified by:
        `setStoreCancelledMessage` in interface `IClientQueryCancellation`

    - #### generateCancellationQuery

          public ISegmentSet generateCancellationQuery(java.lang.String strQueryId)

      This method will generate segment set for QCN^J01.
      Specified by:
        `generateCancellationQuery` in interface `IClientQueryCancellation`
      Parameters:
        `strQueryId` - Query Id for which to generate Segment Set.
      Returns:
        ISegmentSet object of Segment set.