Class ExecutionAttribute<T>
java.lang.Object
software.amazon.awssdk.core.interceptor.ExecutionAttribute<T>
- Type Parameters:
- T- The type of data associated with this attribute.
An attribute attached to a particular execution, stored in 
ExecutionAttributes.
 This is typically used as a static final field in an ExecutionInterceptor:
 
 
  class MyExecutionInterceptor implements ExecutionInterceptor {
      private static final ExecutionAttribute<String> DATA = new ExecutionAttribute<>();
      public void beforeExecution(Context.BeforeExecution execution, ExecutionAttributes executionAttributes) {
          executionAttributes.put(DATA, "Request: " + execution.request());
      }
      public void afterExecution(Context.AfterExecution execution, ExecutionAttributes executionAttributes) {
          String data = executionAttributes.get(DATA); // Retrieve the value saved in beforeExecution.
      }
  }
 
 - 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final class
- 
Constructor SummaryConstructorsConstructorDescriptionExecutionAttribute(String name) Creates a newExecutionAttributebound to the provided type param.
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T,U> ExecutionAttribute.DerivedAttributeBuilder <T, U> derivedBuilder(String name, Class<T> attributeType, Supplier<ExecutionAttribute<U>> realAttribute) This is the same asderivedBuilder(String, Class, ExecutionAttribute), but the real attribute is loaded lazily at runtime.static <T,U> ExecutionAttribute.DerivedAttributeBuilder <T, U> derivedBuilder(String name, Class<T> attributeType, ExecutionAttribute<U> realAttribute) Create an execution attribute whose value is derived from another attribute.booleanThis override considers execution attributes with the same name to be the same object for the purpose of attribute merge.inthashCode()This override considers execution attributes with the same name to be the same object for the purpose of attribute merge.toString()
- 
Constructor Details- 
ExecutionAttributeCreates a newExecutionAttributebound to the provided type param.- Parameters:
- name- Descriptive name for the attribute, used primarily for debugging purposes.
 
 
- 
- 
Method Details- 
derivedBuilderpublic static <T,U> ExecutionAttribute.DerivedAttributeBuilder<T,U> derivedBuilder(String name, Class<T> attributeType, ExecutionAttribute<U> realAttribute) Create an execution attribute whose value is derived from another attribute.Whenever this value is read, its value is read from a different "real" attribute, and whenever this value is written its value is written to the "real" attribute, instead. This is useful when new attributes are created to replace old attributes, but for backwards-compatibility those old attributes still need to be made available. - Parameters:
- name- The name of the attribute to create
- attributeType- The type of the attribute being created
- realAttribute- The "real" attribute from which this attribute is derived
 
- 
derivedBuilderpublic static <T,U> ExecutionAttribute.DerivedAttributeBuilder<T,U> derivedBuilder(String name, Class<T> attributeType, Supplier<ExecutionAttribute<U>> realAttribute) This is the same asderivedBuilder(String, Class, ExecutionAttribute), but the real attribute is loaded lazily at runtime. This is useful when the real attribute is in the same class hierarchy, to avoid initialization order problems.
- 
toString
- 
equals
- 
hashCode
 
-