Interface EndpointBuilder<T extends Endpoint>


public interface EndpointBuilder<T extends Endpoint>
Endpoint builder interface. All endpoint builder implementations do implement this interface in order to build endpoints using a fluent Java API.
Since:
2.5
Author:
Christoph Deppisch
  • Field Details

    • logger

      static final org.slf4j.Logger logger
      Logger
    • RESOURCE_PATH

      static final String RESOURCE_PATH
      Endpoint builder resource lookup path
      See Also:
    • TYPE_RESOLVER

      static final ResourcePathTypeResolver TYPE_RESOLVER
      Default Citrus endpoint builders from classpath resource properties
  • Method Details

    • supports

      boolean supports(Class<?> endpointType)
      Evaluate if this builder supports the given type.
      Parameters:
      endpointType - type to check.
      Returns:
      true when the builder is able to build the endpoint type, false otherwise.
    • build

      T build()
      Builds the endpoint.
      Returns:
    • build

      default T build(CitrusEndpoint endpointAnnotation, ReferenceResolver referenceResolver)
      Builds the endpoint from given endpoint annotations.
      Parameters:
      endpointAnnotation -
      referenceResolver -
      Returns:
    • build

      default T build(Properties endpointProperties, ReferenceResolver referenceResolver)
      Builds the endpoint from given endpoint properties.
      Parameters:
      endpointProperties -
      referenceResolver -
      Returns:
    • lookup

      static Map<String,EndpointBuilder<?>> lookup()
      Resolves all available endpoint builders from resource path lookup. Scans classpath for endpoint builder meta information and instantiates those builders.
      Returns:
    • lookup

      static Optional<EndpointBuilder<?>> lookup(String builder)
      Resolves endpoint builder from resource path lookup with given resource name. Scans classpath for endpoint builder meta information with given name and returns instance of the builder. Returns optional instead of throwing exception when no endpoint builder could be found. Given builder name is a combination of resource file name and type property separated by '.' character.
      Parameters:
      builder -
      Returns: