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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
SessionState.Builder
RecordBuilder for SessionState instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public String
sessionId
public Instant
sessionStartTime
public Instant
lastReceivedMessageTime
public HoldingIdentity
counterpartyIdentity
public boolean
requireClose
public SessionProcessState
receivedEventsState
public SessionProcessState
sendEventsState
public SessionStateType
status
public boolean
hasScheduledCleanup
public KeyValuePairList
sessionProperties
-
Constructor Summary
Constructors Constructor Description SessionState()
Default constructor. SessionState(String sessionId, Instant sessionStartTime, Instant lastReceivedMessageTime, HoldingIdentity counterpartyIdentity, Boolean requireClose, SessionProcessState receivedEventsState, SessionProcessState sendEventsState, SessionStateType status, Boolean hasScheduledCleanup, KeyValuePairList sessionProperties)
All-args constructor.
-
Method Summary
Modifier and Type Method Description String
getSessionId()
Gets the value of the 'sessionId' field. void
setSessionId(String value)
Sets the value of the 'sessionId' field. Instant
getSessionStartTime()
Gets the value of the 'sessionStartTime' field. void
setSessionStartTime(Instant value)
Sets the value of the 'sessionStartTime' field. Instant
getLastReceivedMessageTime()
Gets the value of the 'lastReceivedMessageTime' field. void
setLastReceivedMessageTime(Instant value)
Sets the value of the 'lastReceivedMessageTime' field. HoldingIdentity
getCounterpartyIdentity()
Gets the value of the 'counterpartyIdentity' field. void
setCounterpartyIdentity(HoldingIdentity value)
Sets the value of the 'counterpartyIdentity' field. boolean
getRequireClose()
Gets the value of the 'requireClose' field. void
setRequireClose(boolean value)
Sets the value of the 'requireClose' field. SessionProcessState
getReceivedEventsState()
Gets the value of the 'receivedEventsState' field. void
setReceivedEventsState(SessionProcessState value)
Sets the value of the 'receivedEventsState' field. SessionProcessState
getSendEventsState()
Gets the value of the 'sendEventsState' field. void
setSendEventsState(SessionProcessState value)
Sets the value of the 'sendEventsState' field. SessionStateType
getStatus()
Gets the value of the 'status' field. void
setStatus(SessionStateType value)
Sets the value of the 'status' field. boolean
getHasScheduledCleanup()
Gets the value of the 'hasScheduledCleanup' field. void
setHasScheduledCleanup(boolean value)
Sets the value of the 'hasScheduledCleanup' field. KeyValuePairList
getSessionProperties()
Gets the value of the 'sessionProperties' field. void
setSessionProperties(KeyValuePairList value)
Sets the value of the 'sessionProperties' field. static Schema
getClassSchema()
static BinaryMessageEncoder<SessionState>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<SessionState>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<SessionState>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this SessionState to a ByteBuffer. static SessionState
fromByteBuffer(ByteBuffer b)
Deserializes a SessionState from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
Conversion<out Object>
getConversion(int field)
void
put(int field$, Object value$)
static SessionState.Builder
newBuilder()
Creates a new SessionState RecordBuilder. static SessionState.Builder
newBuilder(SessionState.Builder other)
Creates a new SessionState RecordBuilder by copying an existing Builder. static SessionState.Builder
newBuilder(SessionState other)
Creates a new SessionState RecordBuilder by copying an existing SessionState instance. void
writeExternal(ObjectOutput out)
void
readExternal(ObjectInput in)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, customDecode, customEncode, equals, hashCode, toString
-
Methods inherited from class org.apache.avro.generic.GenericRecord
hasField
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
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 createdlastReceivedMessageTime
- Time ([Instant]) in milliseconds when the last session event was received from a counterpartycounterpartyIdentity
- 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
-
getSessionId
String getSessionId()
Gets the value of the 'sessionId' field.
-
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.
-
getSessionStartTime
Instant getSessionStartTime()
Gets the value of the 'sessionStartTime' field.
-
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.
-
getLastReceivedMessageTime
Instant getLastReceivedMessageTime()
Gets the value of the 'lastReceivedMessageTime' field.
-
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.
-
getCounterpartyIdentity
HoldingIdentity getCounterpartyIdentity()
Gets the value of the 'counterpartyIdentity' field.
-
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.
-
getReceivedEventsState
SessionProcessState getReceivedEventsState()
Gets the value of the 'receivedEventsState' field.
-
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.
-
getSendEventsState
SessionProcessState getSendEventsState()
Gets the value of the 'sendEventsState' field.
-
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.
-
getStatus
SessionStateType getStatus()
Gets the value of the 'status' field.
-
setStatus
void setStatus(SessionStateType value)
Sets the value of the 'status' field. The status of the session.
- Parameters:
value
- the value to set.
-
getHasScheduledCleanup
boolean getHasScheduledCleanup()
Gets the value of the 'hasScheduledCleanup' field.
-
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.
-
getSessionProperties
KeyValuePairList getSessionProperties()
Gets the value of the 'sessionProperties' field.
-
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.
-
getClassSchema
static Schema getClassSchema()
-
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
-
toByteBuffer
ByteBuffer toByteBuffer()
Serializes this SessionState to a ByteBuffer.
-
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
-
getSpecificData
SpecificData getSpecificData()
-
getSchema
Schema getSchema()
-
getConversion
Conversion<out Object> getConversion(int field)
-
newBuilder
static SessionState.Builder newBuilder()
Creates a new SessionState RecordBuilder.
-
newBuilder
static SessionState.Builder newBuilder(SessionState.Builder other)
Creates a new SessionState RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.
-
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.
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
-
-
-