Package org.citrusframework.endpoint
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final org.slf4j.LoggerLoggerstatic final StringEndpoint builder resource lookup pathstatic final ResourcePathTypeResolverDefault Citrus endpoint builders from classpath resource properties -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the endpoint.default Tbuild(Properties endpointProperties, ReferenceResolver referenceResolver) Builds the endpoint from given endpoint properties.default Tbuild(CitrusEndpoint endpointAnnotation, ReferenceResolver referenceResolver) Builds the endpoint from given endpoint annotations.static Map<String,EndpointBuilder<?>> lookup()Resolves all available endpoint builders from resource path lookup.static Optional<EndpointBuilder<?>>Resolves endpoint builder from resource path lookup with given resource name.booleanEvaluate if this builder supports the given type.
-
Field Details
-
logger
static final org.slf4j.Logger loggerLogger -
RESOURCE_PATH
Endpoint builder resource lookup path- See Also:
-
TYPE_RESOLVER
Default Citrus endpoint builders from classpath resource properties
-
-
Method Details
-
supports
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
Builds the endpoint from given endpoint annotations.- Parameters:
endpointAnnotation-referenceResolver-- Returns:
-
build
Builds the endpoint from given endpoint properties.- Parameters:
endpointProperties-referenceResolver-- Returns:
-
lookup
Resolves all available endpoint builders from resource path lookup. Scans classpath for endpoint builder meta information and instantiates those builders.- Returns:
-
lookup
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:
-