cdac.medinfo.sdk.hl7282.hl7net.auxiliaryprotocol.sequence

## Class InitiatingSequenceAgent

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.hl7net.auxiliaryprotocol.sequence.InitiatingSequenceAgent

- All Implemented Interfaces:
    ISequenceAgent

      public class InitiatingSequenceAgent
      extends java.lang.Object
      implements ISequenceAgent

  This class keeps the records and provides the necessary Sequence Number to the Messages. Checks and verifies whether the Sequence Number of Messages are correctly placed or not.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `bStartSequencing` Boolean variable to tell about sequence numbering is start or not

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static InitiatingSequenceAgent` | `createInstance()` Create new instance or old one depends on existing of instance variable.
    `void` | `processReceive(ISegmentSet objSegmentSet)` Invoked when system receive message.
    `void` | `processSend(ISegmentSet objSegmentSet)` Process and populate the sequence numbering.
    `void` | `setEndSequencing(boolean flag)` Ends the Sequence Numbering
    `void` | `setInitialQueueValue(int value)` Sets the initial value in Queue.
    `void` | `setQueueLength(int length)` Sets Queue length.
    `void` | `setStartSequencing(boolean flag)` Starts the Sequence Numbering.

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

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

- - ### Field Detail

    - #### bStartSequencing

          public boolean bStartSequencing

      Boolean variable to tell about sequence numbering is start or not

  - ### Method Detail

    - #### createInstance

          public static InitiatingSequenceAgent createInstance()

      Create new instance or old one depends on existing of instance variable.
      Returns:
        InitiatingSequenceAgnet - instance of Initiating Sequence Agnet.

    - #### setInitialQueueValue

          public void setInitialQueueValue(int value)

      Sets the initial value in Queue.
      Specified by:
        `setInitialQueueValue` in interface `ISequenceAgent`
      Parameters:
        `value` - - initial value of Queue.

    - #### setQueueLength

          public void setQueueLength(int length)

      Sets Queue length.
      Specified by:
        `setQueueLength` in interface `ISequenceAgent`
      Parameters:
        `length` - - length of Queue.

    - #### setStartSequencing

          public void setStartSequencing(boolean flag)

      Starts the Sequence Numbering.
      Specified by:
        `setStartSequencing` in interface `ISequenceAgent`
      Parameters:
        `flag` - - To start set true.

    - #### setEndSequencing

          public void setEndSequencing(boolean flag)

      Ends the Sequence Numbering
      Specified by:
        `setEndSequencing` in interface `ISequenceAgent`
      Parameters:
        `flag` - - To end set false.

    - #### processSend

          public void processSend(ISegmentSet objSegmentSet)
                           throws InvalidMessageException

      Process and populate the sequence numbering.
      Specified by:
        `processSend` in interface `ISequenceAgent`
      Parameters:
        `objSegmentSet` - - Segment set to which populate.
      Throws:
        `InvalidMessageException` - - Thrown When Message Populated is Invalid.

    - #### processReceive

          public void processReceive(ISegmentSet objSegmentSet)
                              throws InvalidMessageException

      Invoked when system receive message.
      Specified by:
        `processReceive` in interface `ISequenceAgent`
      Parameters:
        `objSegmentSet` - - Segment set filled with Sequence Number.
      Throws:
        `InvalidMessageException` - - Thrown When Message Populated is Invalid.