Class Transaction
- java.lang.Object
-
- io.github.ma1uta.matrix.server.model.federation.Transaction
-
public class Transaction extends Object
The transfer of EDUs and PDUs between homeservers is performed by an exchange of Transaction messages, which are encoded as JSON objects, passed over an HTTP PUT request. A Transaction is meaningful only to the pair of homeservers that exchanged it; they are not globally-meaningful.
Each transaction has:- An opaque transaction ID, unique among transactions from the same origin.
- A timestamp (UNIX epoch time in milliseconds) generated by its origin server.
- An origin and destination server name.
- A list of PDUs and EDUs - the actual message payload that the Transaction carries.
-
-
Field Summary
Fields Modifier and Type Field Description private List<EphemeralDataUnit>
edus
List of ephemeral messages.private String
origin
Required. server_name of homeserver sending this transaction.private Long
originServerTs
Required.private List<PersistedDataUnit>
pdus
Required.
-
Constructor Summary
Constructors Constructor Description Transaction()
-
Method Summary
Modifier and Type Method Description List<EphemeralDataUnit>
getEdus()
String
getOrigin()
Long
getOriginServerTs()
List<PersistedDataUnit>
getPdus()
void
setEdus(List<EphemeralDataUnit> edus)
void
setOrigin(String origin)
void
setOriginServerTs(Long originServerTs)
void
setPdus(List<PersistedDataUnit> pdus)
-
-
-
Field Detail
-
origin
private String origin
Required. server_name of homeserver sending this transaction.
-
originServerTs
private Long originServerTs
Required. Timestamp in milliseconds on originating homeserver when this transaction started.
-
pdus
private List<PersistedDataUnit> pdus
Required. List of persistent updates to rooms.
-
edus
private List<EphemeralDataUnit> edus
List of ephemeral messages. May be omitted if there are no ephemeral messages to be sent.
-
-
Method Detail
-
getOrigin
public String getOrigin()
-
setOrigin
public void setOrigin(String origin)
-
getOriginServerTs
public Long getOriginServerTs()
-
setOriginServerTs
public void setOriginServerTs(Long originServerTs)
-
getPdus
public List<PersistedDataUnit> getPdus()
-
setPdus
public void setPdus(List<PersistedDataUnit> pdus)
-
getEdus
public List<EphemeralDataUnit> getEdus()
-
setEdus
public void setEdus(List<EphemeralDataUnit> edus)
-
-