Class EventResourcesImpl

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void copyFrom​(EventResourcesImpl other)  
      void forEach​(java.util.function.BiConsumer<java.lang.String,​java.lang.String> process)  
      static void forEach​(java.util.List<java.lang.Object> list, java.util.function.BiConsumer<java.lang.String,​java.lang.String> process)  
      EventResources resource​(java.lang.String key, java.lang.Object value)
      Add a resource for the event.
      EventResources resource​(java.lang.String key, java.util.function.Supplier<java.lang.String> value)
      Add a resource for the event using a supplier.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • resource

        public EventResources resource​(java.lang.String key,
                                       java.lang.Object value)
        Description copied from interface: EventResources
        Add a resource for the event. Resources are inherited by child events.
        Specified by:
        resource in interface EventResources
        Parameters:
        key - the key to identify the resource
        value - the value which will be logged for the resource. This is converted to a string before logging.
        Returns:
        this
      • resource

        public EventResources resource​(java.lang.String key,
                                       java.util.function.Supplier<java.lang.String> value)
        Description copied from interface: EventResources
        Add a resource for the event using a supplier. The supplier is used in the case that generating the string from the object is expensive or we want to generate a custom string.
        Specified by:
        resource in interface EventResources
        Parameters:
        key - the key to identify the resource
        value - a supplier which returns the value to be logged for this resource
        See Also:
        EventResources.resource(java.lang.String,java.lang.Object)
      • forEach

        public void forEach​(java.util.function.BiConsumer<java.lang.String,​java.lang.String> process)
      • forEach

        public static void forEach​(java.util.List<java.lang.Object> list,
                                   java.util.function.BiConsumer<java.lang.String,​java.lang.String> process)