Package org.citrusframework.endpoint
Class AbstractEndpointComponent
java.lang.Object
org.citrusframework.endpoint.AbstractEndpointComponent
- All Implemented Interfaces:
org.citrusframework.endpoint.EndpointComponent
- Direct Known Subclasses:
DirectEndpointComponent,MessageStoreEndpointComponent
public abstract class AbstractEndpointComponent
extends Object
implements org.citrusframework.endpoint.EndpointComponent
Default endpoint component reads component name from endpoint uri and parses parameters from uri using
the HTTP uri pattern.
http://localhost:8080?param1=value1¶m2=value2¶m3=value3 jms:queue.name?connectionFactory=specialConnectionFactory soap:localhost:8080?soapAction=sayHello
- Since:
- 1.4.1
-
Field Summary
Fields inherited from interface org.citrusframework.endpoint.EndpointComponent
AUTO_CLOSE, AUTO_REMOVE, ENDPOINT_CACHE, ENDPOINT_NAME, logger, RESOURCE_PATH, TYPE_RESOLVER -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor using the name for this component. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract org.citrusframework.endpoint.EndpointcreateEndpoint(String resourcePath, Map<String, String> parameters, org.citrusframework.context.TestContext context) Create endpoint instance from uri resource and parameters.org.citrusframework.endpoint.EndpointcreateEndpoint(String endpointUri, org.citrusframework.context.TestContext context) protected voidenrichEndpointConfiguration(org.citrusframework.endpoint.EndpointConfiguration endpointConfiguration, Map<String, String> parameters, org.citrusframework.context.TestContext context) Sets properties on endpoint configuration using method reflection.getEndpointConfigurationParameters(Map<String, String> parameters, Class<? extends org.citrusframework.endpoint.EndpointConfiguration> endpointConfigurationType) Removes non config parameters from list of endpoint parameters according to given endpoint configuration type.getName()getParameters(String endpointUri) protected StringgetParameterString(Map<String, String> parameters, Class<? extends org.citrusframework.endpoint.EndpointConfiguration> endpointConfigurationType) Filters non endpoint configuration parameters from parameter list and puts them together as parameters string.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.citrusframework.endpoint.EndpointComponent
supportsEndpointCaching
-
Constructor Details
-
AbstractEndpointComponent
Default constructor using the name for this component.- Parameters:
name-
-
-
Method Details
-
createEndpoint
public org.citrusframework.endpoint.Endpoint createEndpoint(String endpointUri, org.citrusframework.context.TestContext context) - Specified by:
createEndpointin interfaceorg.citrusframework.endpoint.EndpointComponent
-
getParameters
- Specified by:
getParametersin interfaceorg.citrusframework.endpoint.EndpointComponent
-
enrichEndpointConfiguration
protected void enrichEndpointConfiguration(org.citrusframework.endpoint.EndpointConfiguration endpointConfiguration, Map<String, String> parameters, org.citrusframework.context.TestContext context) Sets properties on endpoint configuration using method reflection.- Parameters:
endpointConfiguration-parameters-context-
-
getEndpointConfigurationParameters
protected Map<String,String> getEndpointConfigurationParameters(Map<String, String> parameters, Class<? extends org.citrusframework.endpoint.EndpointConfiguration> endpointConfigurationType) Removes non config parameters from list of endpoint parameters according to given endpoint configuration type. All parameters that do not reside to an endpoint configuration setting are removed so the result is a qualified list of endpoint configuration parameters. -
getParameterString
protected String getParameterString(Map<String, String> parameters, Class<? extends org.citrusframework.endpoint.EndpointConfiguration> endpointConfigurationType) Filters non endpoint configuration parameters from parameter list and puts them together as parameters string. According to given endpoint configuration type only non endpoint configuration settings are added to parameter string. -
createEndpoint
protected abstract org.citrusframework.endpoint.Endpoint createEndpoint(String resourcePath, Map<String, String> parameters, org.citrusframework.context.TestContext context) Create endpoint instance from uri resource and parameters. -
getName
- Specified by:
getNamein interfaceorg.citrusframework.endpoint.EndpointComponent
-