public abstract class AbstractEndpointComponent extends Object implements EndpointComponent
Modifier and Type | Field and Description |
---|---|
static String |
ENDPOINT_NAME |
Constructor and Description |
---|
AbstractEndpointComponent() |
Modifier and Type | Method and Description |
---|---|
protected abstract Endpoint |
createEndpoint(String resourcePath,
Map<String,String> parameters,
TestContext context)
Create endpoint instance from uri resource and parameters.
|
Endpoint |
createEndpoint(String endpointUri,
TestContext context)
Creates proper endpoint instance from endpoint uri.
|
protected void |
enrichEndpointConfiguration(EndpointConfiguration endpointConfiguration,
Map<String,String> parameters,
TestContext context)
Sets properties on endpoint configuration using method reflection.
|
protected Map<String,String> |
getEndpointConfigurationParameters(Map<String,String> parameters,
Class<? extends EndpointConfiguration> endpointConfigurationType)
Removes non config parameters from list of endpoint parameters according to given endpoint configuration type.
|
String |
getName()
Gets the name of this endpoint component.
|
Map<String,String> |
getParameters(String endpointUri)
Construct endpoint name from endpoint uri.
|
protected String |
getParameterString(Map<String,String> parameters,
Class<? extends EndpointConfiguration> endpointConfigurationType)
Filters non endpoint configuration parameters from parameter list and puts them
together as parameters string.
|
void |
setBeanName(String name) |
void |
setName(String name)
Sets the endpoint component name.
|
public static final String ENDPOINT_NAME
public Endpoint createEndpoint(String endpointUri, TestContext context)
EndpointComponent
createEndpoint
in interface EndpointComponent
public Map<String,String> getParameters(String endpointUri)
EndpointComponent
getParameters
in interface EndpointComponent
protected void enrichEndpointConfiguration(EndpointConfiguration endpointConfiguration, Map<String,String> parameters, TestContext context)
endpointConfiguration
- parameters
- context
- protected Map<String,String> getEndpointConfigurationParameters(Map<String,String> parameters, Class<? extends EndpointConfiguration> endpointConfigurationType)
parameters
- endpointConfigurationType
- protected String getParameterString(Map<String,String> parameters, Class<? extends EndpointConfiguration> endpointConfigurationType)
parameters
- endpointConfigurationType
- protected abstract Endpoint createEndpoint(String resourcePath, Map<String,String> parameters, TestContext context)
resourcePath
- parameters
- context
- public String getName()
EndpointComponent
getName
in interface EndpointComponent
public void setName(String name)
EndpointComponent
setName
in interface EndpointComponent
public void setBeanName(String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
Copyright © 2008–2017 ConSol Software GmbH. All rights reserved.