Package org.citrusframework.endpoint
Class AbstractEndpointAdapter
java.lang.Object
org.citrusframework.endpoint.AbstractEndpointAdapter
- All Implemented Interfaces:
EndpointAdapter
- Direct Known Subclasses:
DirectEndpointAdapter,StaticEndpointAdapter
Abstract endpoint adapter adds fallback endpoint adapter in case no response was provided.
- Since:
- 1.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the fallback endpoint adapter.getName()Gets this endpoint adapter's name - usually injected as Spring bean name.protected TestContextGets new test context from factory.Gets the test context factory.final MessagehandleMessage(Message request) protected abstract MessagehandleMessageInternal(Message message) Subclasses must implement this method in order to handle incoming request message.voidsetFallbackEndpointAdapter(EndpointAdapter fallbackEndpointAdapter) Sets the fallback endpoint adapter.voidSets the name of this endpoint adapter.voidsetTestContextFactory(TestContextFactory testContextFactory) Sets the test context factory.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.citrusframework.endpoint.EndpointAdapter
getEndpoint, getEndpointConfiguration
-
Constructor Details
-
AbstractEndpointAdapter
public AbstractEndpointAdapter()
-
-
Method Details
-
handleMessage
- Specified by:
handleMessagein interfaceEndpointAdapter
-
handleMessageInternal
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
Sets the name of this endpoint adapter.- Parameters:
name-
-
getName
Gets this endpoint adapter's name - usually injected as Spring bean name.- Returns:
-
getFallbackEndpointAdapter
Gets the fallback endpoint adapter.- Returns:
-
setFallbackEndpointAdapter
Sets the fallback endpoint adapter.- Parameters:
fallbackEndpointAdapter-
-
setTestContextFactory
Sets the test context factory.- Parameters:
testContextFactory-
-
getTestContextFactory
Gets the test context factory.- Returns:
-
getTestContext
Gets new test context from factory.- Returns:
-