Package com.consol.citrus.endpoint
Interface EndpointComponent
-
public interface EndpointComponentEndpoint component registers with bean name in Spring application context and is then responsible to create proper endpoints dynamically from endpoint uri values. Creates endpoint instance by parsing the dynamic endpoint uri with special properties and parameters. Creates proper endpoint configuration instance on the fly.- Since:
- 1.4.1
- Author:
- Christoph Deppisch
-
-
Field Summary
Fields Modifier and Type Field Description static StringENDPOINT_NAMEstatic org.slf4j.LoggerLOGLoggerstatic StringRESOURCE_PATHEndpoint component resource lookup pathstatic ResourcePathTypeResolverTYPE_RESOLVERDefault Citrus endpoint components from classpath resource properties
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description EndpointcreateEndpoint(String endpointUri, TestContext context)Creates proper endpoint instance from endpoint uri.StringgetName()Gets the name of this endpoint component.Map<String,String>getParameters(String endpointUri)Construct endpoint name from endpoint uri.static Map<String,EndpointComponent>lookup()Resolves all available endpoint components from resource path lookup.static Optional<EndpointComponent>lookup(String component)Resolves endpoint component from resource path lookup with given resource name.
-
-
-
Field Detail
-
LOG
static final org.slf4j.Logger LOG
Logger
-
ENDPOINT_NAME
static final String ENDPOINT_NAME
- See Also:
- Constant Field Values
-
RESOURCE_PATH
static final String RESOURCE_PATH
Endpoint component resource lookup path- See Also:
- Constant Field Values
-
TYPE_RESOLVER
static final ResourcePathTypeResolver TYPE_RESOLVER
Default Citrus endpoint components from classpath resource properties
-
-
Method Detail
-
createEndpoint
Endpoint createEndpoint(String endpointUri, TestContext context)
Creates proper endpoint instance from endpoint uri.- Parameters:
endpointUri-context-- Returns:
-
getName
String getName()
Gets the name of this endpoint component.- Returns:
-
getParameters
Map<String,String> getParameters(String endpointUri)
Construct endpoint name from endpoint uri.- Parameters:
endpointUri-- Returns:
-
lookup
static Map<String,EndpointComponent> lookup()
Resolves all available endpoint components from resource path lookup. Scans classpath for endpoint component meta information and instantiates those components.- Returns:
-
lookup
static Optional<EndpointComponent> lookup(String component)
Resolves endpoint component from resource path lookup with given resource name. Scans classpath for endpoint component meta information with given name and returns instance of the component. Returns optional instead of throwing exception when no endpoint component could be found.- Parameters:
component-- Returns:
-
-