Package com.consol.citrus.endpoint
Class AbstractEndpointAdapter
- java.lang.Object
-
- com.consol.citrus.endpoint.AbstractEndpointAdapter
-
- All Implemented Interfaces:
com.consol.citrus.endpoint.EndpointAdapter
- Direct Known Subclasses:
DirectEndpointAdapter
,StaticEndpointAdapter
public abstract class AbstractEndpointAdapter extends Object implements com.consol.citrus.endpoint.EndpointAdapter
Abstract endpoint adapter adds fallback endpoint adapter in case no response was provided.- Since:
- 1.4
- Author:
- Christoph Deppisch
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
log
Logger
-
Constructor Summary
Constructors Constructor Description AbstractEndpointAdapter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description com.consol.citrus.endpoint.EndpointAdapter
getFallbackEndpointAdapter()
Gets the fallback endpoint adapter.String
getName()
Gets this endpoint adapter's name - usually injected as Spring bean name.protected com.consol.citrus.context.TestContext
getTestContext()
Gets new test context from factory.com.consol.citrus.context.TestContextFactory
getTestContextFactory()
Gets the test context factory.com.consol.citrus.message.Message
handleMessage(com.consol.citrus.message.Message request)
protected abstract com.consol.citrus.message.Message
handleMessageInternal(com.consol.citrus.message.Message message)
Subclasses must implement this method in order to handle incoming request message.void
setFallbackEndpointAdapter(com.consol.citrus.endpoint.EndpointAdapter fallbackEndpointAdapter)
Sets the fallback endpoint adapter.void
setName(String name)
Sets the name of this endpoint adapter.void
setTestContextFactory(com.consol.citrus.context.TestContextFactory testContextFactory)
Sets the test context factory.
-
-
-
Method Detail
-
handleMessage
public final com.consol.citrus.message.Message handleMessage(com.consol.citrus.message.Message request)
- Specified by:
handleMessage
in interfacecom.consol.citrus.endpoint.EndpointAdapter
-
handleMessageInternal
protected abstract com.consol.citrus.message.Message handleMessageInternal(com.consol.citrus.message.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 com.consol.citrus.endpoint.EndpointAdapter getFallbackEndpointAdapter()
Gets the fallback endpoint adapter.- Returns:
-
setFallbackEndpointAdapter
public void setFallbackEndpointAdapter(com.consol.citrus.endpoint.EndpointAdapter fallbackEndpointAdapter)
Sets the fallback endpoint adapter.- Parameters:
fallbackEndpointAdapter
-
-
setTestContextFactory
public void setTestContextFactory(com.consol.citrus.context.TestContextFactory testContextFactory)
Sets the test context factory.- Parameters:
testContextFactory
-
-
getTestContextFactory
public com.consol.citrus.context.TestContextFactory getTestContextFactory()
Gets the test context factory.- Returns:
-
getTestContext
protected com.consol.citrus.context.TestContext getTestContext()
Gets new test context from factory.- Returns:
-
-