Class SessionState

  • All Implemented Interfaces:
    java.io.Externalizable , java.io.Serializable , java.lang.Comparable , org.apache.avro.generic.GenericContainer , org.apache.avro.generic.GenericRecord , org.apache.avro.generic.IndexedRecord , org.apache.avro.specific.SpecificRecord

    
    public class SessionState
    extends SpecificRecordBase implements SpecificRecord
                        
    • Constructor Detail

      • SessionState

        SessionState()
        Default constructor.
      • SessionState

        SessionState(String sessionId, Instant sessionStartTime, Instant lastReceivedMessageTime, HoldingIdentity counterpartyIdentity, Boolean requireClose, SessionProcessState receivedEventsState, SessionProcessState sendEventsState, SessionStateType status, Boolean hasScheduledCleanup, KeyValuePairList sessionProperties)
        All-args constructor.
        Parameters:
        sessionId - UUID for the session.
        sessionStartTime - Time ([Instant]) in milliseconds when the session was created
        lastReceivedMessageTime - Time ([Instant]) in milliseconds when the last session event was received from a counterparty
        counterpartyIdentity - Identity of the counterparty in the session.
        requireClose - True if the user has set requireClose to be true when calling initiate flow.
        receivedEventsState - Record the highest contiguous sequence number received from the counterparty.
        sendEventsState - Record the sequence number of the last event sent to the counterparty.
        status - The status of the session.
        hasScheduledCleanup - Whether the session state has already scheduled a cleanup event with the flow mapper.
        sessionProperties - A map of context properties related to this flow session.
    • Method Detail

      • setSessionId

         void setSessionId(String value)

        Sets the value of the 'sessionId' field. UUID for the session. The initiated party sessionID will have a suffix of `-INITIATED`

        Parameters:
        value - the value to set.
      • setSessionStartTime

         void setSessionStartTime(Instant value)

        Sets the value of the 'sessionStartTime' field. Time ([Instant]) in milliseconds when the session was created

        Parameters:
        value - the value to set.
      • setLastReceivedMessageTime

         void setLastReceivedMessageTime(Instant value)

        Sets the value of the 'lastReceivedMessageTime' field. Time ([Instant]) in milliseconds when the last session event was received from a counterparty

        Parameters:
        value - the value to set.
      • setCounterpartyIdentity

         void setCounterpartyIdentity(HoldingIdentity value)

        Sets the value of the 'counterpartyIdentity' field. Identity of the counterparty in the session.

        Parameters:
        value - the value to set.
      • getRequireClose

         boolean getRequireClose()

        Gets the value of the 'requireClose' field.

      • setRequireClose

         void setRequireClose(boolean value)

        Sets the value of the 'requireClose' field. True if the user has set requireClose to be true when calling initiate flow. False otherwise.

        Parameters:
        value - the value to set.
      • setReceivedEventsState

         void setReceivedEventsState(SessionProcessState value)

        Sets the value of the 'receivedEventsState' field. Record the highest contiguous sequence number received from the counterparty. Record all events received but not yet processed by this party's client code.

        Parameters:
        value - the value to set.
      • setSendEventsState

         void setSendEventsState(SessionProcessState value)

        Sets the value of the 'sendEventsState' field. Record the sequence number of the last event sent to the counterparty. Record all events to be sent to the counterparty.

        Parameters:
        value - the value to set.
      • setStatus

         void setStatus(SessionStateType value)

        Sets the value of the 'status' field. The status of the session.

        Parameters:
        value - the value to set.
      • setHasScheduledCleanup

         void setHasScheduledCleanup(boolean value)

        Sets the value of the 'hasScheduledCleanup' field. Whether the session state has already scheduled a cleanup event with the flow mapper.

        Parameters:
        value - the value to set.
      • setSessionProperties

         void setSessionProperties(KeyValuePairList value)

        Sets the value of the 'sessionProperties' field. A map of context properties related to this flow session. This contains information such as protocol name and the version running.

        Parameters:
        value - the value to set.
      • getEncoder

         static BinaryMessageEncoder<SessionState> getEncoder()

        Return the BinaryMessageEncoder instance used by this class.

      • getDecoder

         static BinaryMessageDecoder<SessionState> getDecoder()

        Return the BinaryMessageDecoder instance used by this class.

      • createDecoder

         static BinaryMessageDecoder<SessionState> createDecoder(SchemaStore resolver)

        Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.

        Parameters:
        resolver - a SchemaStore used to find schemas by fingerprint
      • fromByteBuffer

         static SessionState fromByteBuffer(ByteBuffer b)

        Deserializes a SessionState from a ByteBuffer.

        Parameters:
        b - a byte buffer holding serialized data for an instance of this class
      • newBuilder

         static SessionState.Builder newBuilder(SessionState other)

        Creates a new SessionState RecordBuilder by copying an existing SessionState instance.

        Parameters:
        other - The existing instance to copy.