Interface Context<K,​V>

  • All Superinterfaces:
    Map<K,​V>
    All Known Implementing Classes:
    ContextMap

    public interface Context<K,​V>
    extends Map<K,​V>
    执行上下文,用来在不同的Command间传递信息。 Map后面可以考虑使用AttributeMap代替。
    • Method Detail

      • retrieve

        <T extends V> T retrieve​(K key)
        That method enhances the Map.get(Object) method that helps users avoid the redundant code of type cast/checking when assignments are already known.

        It throws ClassCastException if types are not assignable.

        Type Parameters:
        T - the target assignment type
        Parameters:
        key - the key whose associated value is to be returned
        Returns:
        the value to which the specified key is mapped, or null if this map contains no mapping for the key
        See Also:
        Map.get(Object)
      • logger

        Logger logger()
        This method provider a Logger utililies for user can't construct a logger or try to log pipeline context message to one logger file.
        Returns:
        logger