Class ConfigAnnotationAsset

java.lang.Object
org.eclipse.microprofile.fault.tolerance.tck.config.ConfigAnnotationAsset
All Implemented Interfaces:
org.jboss.shrinkwrap.api.asset.Asset

public class ConfigAnnotationAsset extends Object implements org.jboss.shrinkwrap.api.asset.Asset
  • Constructor Details

    • ConfigAnnotationAsset

      public ConfigAnnotationAsset()
  • Method Details

    • openStream

      public InputStream openStream()
      Specified by:
      openStream in interface org.jboss.shrinkwrap.api.asset.Asset
    • autoscaleMethod

      public ConfigAnnotationAsset autoscaleMethod(Class<?> clazz, String method)
      Generate config which scales the timeout values of all annotations on a single method

      The following values are scaled using the scale factor in TCKConfig:

      • Retry.maxDuration
      • Retry.delay
      • Retry.jitter
      • Timeout.value
      • CircuitBreaker.delay
      Returns:
      this
    • autoscaleClass

      public ConfigAnnotationAsset autoscaleClass(Class<?> clazz)
      Generate config which scales the timeout values of all annotations on the class

      Only annotations directly on the class are affected, config is not generated for any annotations on methods. Use autoscaleMethod(Class, String) to generate config for methods.

      The following values are scaled using the scale factor in TCKConfig:

      • Retry.maxDuration
      • Retry.delay
      • Retry.jitter
      • Timeout.value
      • CircuitBreaker.delay
      Returns:
      this
    • setValue

      public ConfigAnnotationAsset setValue(Class<?> clazz, String method, Class<? extends Annotation> annotation, String value)
      Configure the value parameter on an annotation applied to a method
      Parameters:
      clazz - the class which has the method
      method - the method which has the annotation
      annotation - the annotation type which has the parameter
      value - the value to configure
      Returns:
      this
    • set

      public ConfigAnnotationAsset set(Class<?> clazz, String method, Class<? extends Annotation> annotation, String parameter, String value)
      Configure a parameter on an annotation applied to a method
      Parameters:
      clazz - the class which has the method
      method - the name of the method which has the annotation
      annotation - the annotation type which has the parameter
      parameter - the parameter name
      value - the value to configure
      Returns:
      this
    • setGlobally

      public ConfigAnnotationAsset setGlobally(Class<? extends Annotation> annotation, String parameter, String value)
      Configure the parameter of an annotation globally
      Parameters:
      annotation - the annotation type which has the parameter
      parameter - the parameter name
      value - the value to configure
      Returns:
      this
    • mergeProperties

      public ConfigAnnotationAsset mergeProperties(Properties properties)