Class PDUv1
- java.lang.Object
-
- io.github.ma1uta.matrix.server.model.federation.v1.PDUv1
-
- All Implemented Interfaces:
PersistedDataUnit
public class PDUv1 extends Object implements PersistedDataUnit
These events are broadcast from one homeserver to any others that have joined the same room (identified by Room ID). They are persisted in long-term storage and record the history of messages and state for a room.
Like email, it is the responsibility of the originating server of a PDU to deliver that event to its recipient servers. However PDUs are signed using the originating server's private key so that it is possible to deliver them through third-party servers.
-
-
Field Summary
Fields Modifier and Type Field Description private List<Map<String,Map<String,String>>>
authEvents
Required.private EventContent
content
Required.private Long
depth
Required.private String
eventId
Required.private Map<String,String>
hashes
Required.private String
origin
Required. server_name of the homeserver that created this event.private Long
originServerTs
Required.private List<Map<String,Map<String,String>>>
prevEvents
Required.private String
redacts
Optional.private String
roomId
Required.private String
sender
Required.private Map<String,Map<String,String>>
signatures
Required.private String
stateKey
Optional.private String
type
Required.private Unsigned
unsigned
Optional.
-
Constructor Summary
Constructors Constructor Description PDUv1()
-
Method Summary
-
-
-
Field Detail
-
roomId
private String roomId
Required. Room identifier.
-
sender
private String sender
Required. The ID of the user sending the event.
-
origin
private String origin
Required. server_name of the homeserver that created this event.
-
eventId
private String eventId
Required. Unique identifier for the event being sent.
-
originServerTs
private Long originServerTs
Required. Timestamp in milliseconds on origin homeserver when this event was created.
-
type
private String type
Required. Event type.
-
stateKey
private String stateKey
Optional. If this key is present, the event is a state event, and it will replace previous events with the same type and state_key in the room state.
-
content
private EventContent content
Required. The content of the event.
-
prevEvents
private List<Map<String,Map<String,String>>> prevEvents
Required. Event IDs and hashes of the most recent events in the room that the homeserver was aware of when it made this event.
-
depth
private Long depth
Required. The maximum depth of the prev_events, plus one.
-
authEvents
private List<Map<String,Map<String,String>>> authEvents
Required. Event IDs and hashes for the "auth events" of this event.
-
hashes
private Map<String,String> hashes
Required. Hashes of the PDU, following the algorithm specified in Signing Events.
-
signatures
private Map<String,Map<String,String>> signatures
Required. Signatures of the redacted PDU, following the algorithm specified in Signing Events.
-
redacts
private String redacts
Optional. For redaction events, the ID of the event being redacted.
-
unsigned
private Unsigned unsigned
Optional. Additional data added by the origin server but not covered by the signatures.
-
-
Method Detail
-
getRoomId
public String getRoomId()
-
setRoomId
public void setRoomId(String roomId)
-
getSender
public String getSender()
-
setSender
public void setSender(String sender)
-
getOrigin
public String getOrigin()
-
setOrigin
public void setOrigin(String origin)
-
getEventId
public String getEventId()
-
setEventId
public void setEventId(String eventId)
-
getOriginServerTs
public Long getOriginServerTs()
-
setOriginServerTs
public void setOriginServerTs(Long originServerTs)
-
getType
public String getType()
-
setType
public void setType(String type)
-
getStateKey
public String getStateKey()
-
setStateKey
public void setStateKey(String stateKey)
-
getContent
public EventContent getContent()
-
setContent
public void setContent(EventContent content)
-
getDepth
public Long getDepth()
-
setDepth
public void setDepth(Long depth)
-
getRedacts
public String getRedacts()
-
setRedacts
public void setRedacts(String redacts)
-
getUnsigned
public Unsigned getUnsigned()
-
setUnsigned
public void setUnsigned(Unsigned unsigned)
-
-