Class 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 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.
    • Constructor Detail

      • PDUv1

        public PDUv1()