Interface HeaderReplaceable


  • public interface HeaderReplaceable
    A composable interface that Disco Events can implement if consumers of those events should be able to manipulate the headers of the request associated with the event.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean replaceHeader​(java.lang.String key, java.lang.String value)
      Creates the provided header if it does not exist yet, or replaces the header if it does already exist.
    • Method Detail

      • replaceHeader

        boolean replaceHeader​(java.lang.String key,
                              java.lang.String value)
        Creates the provided header if it does not exist yet, or replaces the header if it does already exist. This should be overridden in a concrete Event class if the functionality is available.
        Parameters:
        key - - key of the header to create or replace
        value - - value of the header
        Returns:
        true if the header is successfully replaced