Flow Session
A FlowSession is a handle on a communication sequence between two paired flows, possibly running on separate nodes.
It is used to send and receive messages between the flows as well as to query information about the counter-flow. Sessions have their own local flow context which can be accessed via getContextProperties. Note that the parent context is snapshotted at the point getContextProperties is first accessed, after which no other changes to the parent context will be reflected in them. See getContextProperties for more information.
There are two ways of obtaining such a session:
- Calling initiateFlow. This will create a FlowSession object on which the first send/receive operation will attempt to kick off a corresponding ResponderFlow flow on the counterpart's node.
- As constructor parameter to ResponderFlow flows. This session is the one corresponding to the initiating flow and may be used for replies.
See also
Functions
Link copied to clipboard
Session local FlowContextProperties.
Link copied to clipboard
The MemberX500Name of the counterparty this session is connected to.
Link copied to clipboard
Returns a [FlowInfo] object describing the flow which the [counterparty] is running.
Link copied to clipboard
Queues the given
payload for sending to getCounterparty and continues without suspending.Link copied to clipboard
@Suspendable
@NotNull
Serializes and queues the given
payload object for sending to getCounterparty.