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&param2=value2&param3=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

    Constructors
    Constructor
    Description
    Default constructor using the name for this component.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    org.citrusframework.endpoint.Endpoint
    createEndpoint(String endpointUri, org.citrusframework.context.TestContext context)
     
    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.
    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.
     
    getParameters(String endpointUri)
     
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.citrusframework.endpoint.EndpointComponent

    supportsEndpointCaching
  • Constructor Details

    • AbstractEndpointComponent

      public AbstractEndpointComponent(String name)
      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:
      createEndpoint in interface org.citrusframework.endpoint.EndpointComponent
    • getParameters

      public Map<String,String> getParameters(String endpointUri)
      Specified by:
      getParameters in interface org.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

      public String getName()
      Specified by:
      getName in interface org.citrusframework.endpoint.EndpointComponent