Package com.consol.citrus.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
Fields Modifier and Type Field Description static org.slf4j.LoggerLOGLoggerstatic StringRESOURCE_PATHEndpoint builder resource lookup pathstatic ResourcePathTypeResolverTYPE_RESOLVERDefault Citrus endpoint builders from classpath resource properties
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Tbuild()Builds the endpoint.default Tbuild(CitrusEndpoint endpointAnnotation, ReferenceResolver referenceResolver)Builds the endpoint from given endpoint annotations.default Tbuild(Properties endpointProperties, ReferenceResolver referenceResolver)Builds the endpoint from given endpoint properties.static Map<String,EndpointBuilder<?>>lookup()Resolves all available endpoint builders from resource path lookup.static Optional<EndpointBuilder<?>>lookup(String builder)Resolves endpoint builder from resource path lookup with given resource name.booleansupports(Class<?> endpointType)Evaluate if this builder supports the given type.
-
-
-
Field Detail
-
LOG
static final org.slf4j.Logger LOG
Logger
-
RESOURCE_PATH
static final String RESOURCE_PATH
Endpoint builder resource lookup path- See Also:
- Constant Field Values
-
TYPE_RESOLVER
static final ResourcePathTypeResolver TYPE_RESOLVER
Default Citrus endpoint builders from classpath resource properties
-
-
Method Detail
-
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:
-
-