Class SessionEvent
-
- 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 SessionEvent extends SpecificRecordBase implements SpecificRecord
Events sent to counterparties as part of a session
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
SessionEvent.Builder
RecordBuilder for SessionEvent instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public MessageDirection
messageDirection
public Instant
timestamp
public String
sessionId
public Integer
sequenceNum
public HoldingIdentity
initiatingIdentity
public HoldingIdentity
initiatedIdentity
public Object
payload
public KeyValuePairList
contextSessionProperties
-
Constructor Summary
Constructors Constructor Description SessionEvent()
Default constructor. SessionEvent(MessageDirection messageDirection, Instant timestamp, String sessionId, Integer sequenceNum, HoldingIdentity initiatingIdentity, HoldingIdentity initiatedIdentity, Object payload, KeyValuePairList contextSessionProperties)
All-args constructor.
-
Method Summary
Modifier and Type Method Description MessageDirection
getMessageDirection()
Gets the value of the 'messageDirection' field. void
setMessageDirection(MessageDirection value)
Sets the value of the 'messageDirection' field. Instant
getTimestamp()
Gets the value of the 'timestamp' field. void
setTimestamp(Instant value)
Sets the value of the 'timestamp' field. String
getSessionId()
Gets the value of the 'sessionId' field. void
setSessionId(String value)
Sets the value of the 'sessionId' field. Integer
getSequenceNum()
Gets the value of the 'sequenceNum' field. void
setSequenceNum(Integer value)
Sets the value of the 'sequenceNum' field. HoldingIdentity
getInitiatingIdentity()
Gets the value of the 'initiatingIdentity' field. void
setInitiatingIdentity(HoldingIdentity value)
Sets the value of the 'initiatingIdentity' field. HoldingIdentity
getInitiatedIdentity()
Gets the value of the 'initiatedIdentity' field. void
setInitiatedIdentity(HoldingIdentity value)
Sets the value of the 'initiatedIdentity' field. Object
getPayload()
Gets the value of the 'payload' field. void
setPayload(Object value)
Sets the value of the 'payload' field. KeyValuePairList
getContextSessionProperties()
Gets the value of the 'contextSessionProperties' field. void
setContextSessionProperties(KeyValuePairList value)
Sets the value of the 'contextSessionProperties' field. static Schema
getClassSchema()
static BinaryMessageEncoder<SessionEvent>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<SessionEvent>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<SessionEvent>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this SessionEvent to a ByteBuffer. static SessionEvent
fromByteBuffer(ByteBuffer b)
Deserializes a SessionEvent from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
Conversion<out Object>
getConversion(int field)
void
put(int field$, Object value$)
static SessionEvent.Builder
newBuilder()
Creates a new SessionEvent RecordBuilder. static SessionEvent.Builder
newBuilder(SessionEvent.Builder other)
Creates a new SessionEvent RecordBuilder by copying an existing Builder. static SessionEvent.Builder
newBuilder(SessionEvent other)
Creates a new SessionEvent RecordBuilder by copying an existing SessionEvent 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
-
SessionEvent
SessionEvent()
Default constructor.
-
SessionEvent
SessionEvent(MessageDirection messageDirection, Instant timestamp, String sessionId, Integer sequenceNum, HoldingIdentity initiatingIdentity, HoldingIdentity initiatedIdentity, Object payload, KeyValuePairList contextSessionProperties)
All-args constructor.- Parameters:
messageDirection
- INBOUND for messages originating from a counterparty.timestamp
- Time ([Instant]) in milliseconds when the session event was createdsessionId
- UUID for the session.sequenceNum
- Unique id for a message sent to a party.initiatingIdentity
- Identity of party who started a session.initiatedIdentity
- Identity of party in the session who was initiated.payload
- The new value for payloadcontextSessionProperties
- A map of context properties received from a counterparty related to this flow session.
-
-
Method Detail
-
getMessageDirection
MessageDirection getMessageDirection()
Gets the value of the 'messageDirection' field.
-
setMessageDirection
void setMessageDirection(MessageDirection value)
Sets the value of the 'messageDirection' field. INBOUND for messages originating from a counterparty. OUTBOUND for messages to be sent to a counterparty.
- Parameters:
value
- the value to set.
-
getTimestamp
Instant getTimestamp()
Gets the value of the 'timestamp' field.
-
setTimestamp
void setTimestamp(Instant value)
Sets the value of the 'timestamp' field. Time ([Instant]) in milliseconds when the session event was created
- Parameters:
value
- the value to set.
-
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.
-
getSequenceNum
Integer getSequenceNum()
Gets the value of the 'sequenceNum' field.
-
setSequenceNum
void setSequenceNum(Integer value)
Sets the value of the 'sequenceNum' field. Unique id for a message sent to a party. sequenceNum is not bidirectional. Each party will track outbound/inbound sequence numbers separately.
- Parameters:
value
- the value to set.
-
getInitiatingIdentity
HoldingIdentity getInitiatingIdentity()
Gets the value of the 'initiatingIdentity' field.
-
setInitiatingIdentity
void setInitiatingIdentity(HoldingIdentity value)
Sets the value of the 'initiatingIdentity' field. Identity of party who started a session.
- Parameters:
value
- the value to set.
-
getInitiatedIdentity
HoldingIdentity getInitiatedIdentity()
Gets the value of the 'initiatedIdentity' field.
-
setInitiatedIdentity
void setInitiatedIdentity(HoldingIdentity value)
Sets the value of the 'initiatedIdentity' field. Identity of party in the session who was initiated.
- Parameters:
value
- the value to set.
-
getPayload
Object getPayload()
Gets the value of the 'payload' field.
-
setPayload
void setPayload(Object value)
Sets the value of the 'payload' field.
- Parameters:
value
- the value to set.
-
getContextSessionProperties
KeyValuePairList getContextSessionProperties()
Gets the value of the 'contextSessionProperties' field.
-
setContextSessionProperties
void setContextSessionProperties(KeyValuePairList value)
Sets the value of the 'contextSessionProperties' field. A map of context properties received from a counterparty related to this flow session. This is static data and will be set to null when previously sent.
- Parameters:
value
- the value to set.
-
getClassSchema
static Schema getClassSchema()
-
getEncoder
static BinaryMessageEncoder<SessionEvent> getEncoder()
Return the BinaryMessageEncoder instance used by this class.
-
getDecoder
static BinaryMessageDecoder<SessionEvent> getDecoder()
Return the BinaryMessageDecoder instance used by this class.
-
createDecoder
static BinaryMessageDecoder<SessionEvent> 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 SessionEvent to a ByteBuffer.
-
fromByteBuffer
static SessionEvent fromByteBuffer(ByteBuffer b)
Deserializes a SessionEvent 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 SessionEvent.Builder newBuilder()
Creates a new SessionEvent RecordBuilder.
-
newBuilder
static SessionEvent.Builder newBuilder(SessionEvent.Builder other)
Creates a new SessionEvent RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.
-
newBuilder
static SessionEvent.Builder newBuilder(SessionEvent other)
Creates a new SessionEvent RecordBuilder by copying an existing SessionEvent instance.
- Parameters:
other
- The existing instance to copy.
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
-
-
-