Class AbstractEndpointAdapter

java.lang.Object
org.citrusframework.endpoint.AbstractEndpointAdapter
All Implemented Interfaces:
EndpointAdapter
Direct Known Subclasses:
DirectEndpointAdapter, StaticEndpointAdapter

public abstract class AbstractEndpointAdapter extends Object implements EndpointAdapter
Abstract endpoint adapter adds fallback endpoint adapter in case no response was provided.
Since:
1.4
  • Constructor Details

    • AbstractEndpointAdapter

      public AbstractEndpointAdapter()
  • Method Details

    • handleMessage

      public final Message handleMessage(Message request)
      Specified by:
      handleMessage in interface EndpointAdapter
    • handleMessageInternal

      protected abstract Message handleMessageInternal(Message message)
      Subclasses must implement this method in order to handle incoming request message. If this method does not return any response message fallback endpoint adapter is invoked for processing.
      Parameters:
      message -
      Returns:
    • setName

      public void setName(String name)
      Sets the name of this endpoint adapter.
      Parameters:
      name -
    • getName

      public String getName()
      Gets this endpoint adapter's name - usually injected as Spring bean name.
      Returns:
    • getFallbackEndpointAdapter

      public EndpointAdapter getFallbackEndpointAdapter()
      Gets the fallback endpoint adapter.
      Returns:
    • setFallbackEndpointAdapter

      public void setFallbackEndpointAdapter(EndpointAdapter fallbackEndpointAdapter)
      Sets the fallback endpoint adapter.
      Parameters:
      fallbackEndpointAdapter -
    • setTestContextFactory

      public void setTestContextFactory(TestContextFactory testContextFactory)
      Sets the test context factory.
      Parameters:
      testContextFactory -
    • getTestContextFactory

      public TestContextFactory getTestContextFactory()
      Gets the test context factory.
      Returns:
    • getTestContext

      protected TestContext getTestContext()
      Gets new test context from factory.
      Returns: