Class ObjectLogEvent


  • public class ObjectLogEvent
    extends LogEvent
    An object event logged by the WorkingMemoryLogger. It is a snapshot of the event as it was thrown by the working memory. It contains the fact id and a String represention of the object at the time the event was logged.
    • Constructor Detail

      • ObjectLogEvent

        public ObjectLogEvent​(int type,
                              long factId,
                              java.lang.String objectToString)
        Create a new activation log event.
        Parameters:
        type - The type of event. This can only be LogEvent.OBJECT_ASSERTED, LogEvent.OBJECT_MODIFIED or LogEvent.OBJECT_RETRACTED.
        factId - The id of the fact
        objectToString - A toString of the fact
    • Method Detail

      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Overrides:
        readExternal in class LogEvent
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Overrides:
        writeExternal in class LogEvent
        Throws:
        java.io.IOException
      • getFactId

        public long getFactId()
        Returns the fact id of the object this event is about.
        Returns:
        the id of the fact
      • getObjectToString

        public java.lang.String getObjectToString()
        Returns a toString of the fact this event is about at the time the event was created.
        Returns:
        the toString of the fact
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object