Class EventRecorder

  • @Node
    public class EventRecorder
    extends User
    Records all events in the world, saves them to the database, plays them back. This is a special case of Client that has no session, but copies scene and properties from the client it impersonates. By overriding Client's sendMessage(), it maintains internal list of received events. Once recording is done, i.e. stop() is called, event list is persisted to the database.
    See Also:
    PersistentEvent, Recording
    • Constructor Detail

      • EventRecorder

        public EventRecorder()
    • Method Detail

      • start

        public void start()
      • stop

        public void stop()
      • processEvent

        public void processEvent​(VREvent event)
        Description copied from class: Client
        Process an event received from other active objects, typically other users. This implementation serializes the event and sends it over websocket.
        processEvent in class Client
        event - Whatever has changed
      • play

        public void play()
        Play recorded client events as own events, optionally restart the loop when finished.
      • play

        public void play​(Client viewer)
        Play back to a client sends all recorded events back to a client, optionally restarts the loop when finished.
        viewer - Client who's viewing the recording
      • isRecordClient

        public boolean isRecordClient()
      • isRecordScene

        public boolean isRecordScene()
      • isLoop

        public boolean isLoop()
      • getLength

        public Long getLength()
      • getClient

        public Client getClient()
      • isRecording

        public boolean isRecording()
      • getStart

        public long getStart()
      • isPlaying

        public boolean isPlaying()
      • setRecordClient

        public void setRecordClient​(boolean recordClient)
      • setRecordScene

        public void setRecordScene​(boolean recordScene)
      • setLoop

        public void setLoop​(boolean loop)
      • setLength

        public void setLength​(Long length)
      • setClient

        public void setClient​(Client client)
      • setRecording

        public void setRecording​(boolean recording)
      • setStart

        public void setStart​(long start)
      • setPlaying

        public void setPlaying​(boolean playing)
      • equals

        public boolean equals​(Object o)
        equals in class User
      • canEqual

        protected boolean canEqual​(Object other)
        canEqual in class User
      • hashCode

        public int hashCode()
        hashCode in class User