Class TestKitHelper
- java.lang.Object
-
- org.apache.camel.support.DefaultExchangeHolder
-
- de.ikor.sip.foundation.core.util.SIPExchangeHelper
-
- de.ikor.sip.foundation.testkit.util.TestKitHelper
-
- All Implemented Interfaces:
Serializable
public class TestKitHelper extends SIPExchangeHelper
Utility class that changes theExchange- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TestKitHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetRouteId(org.apache.camel.Exchange exchange)Get route id from theExchangestatic booleanisTestKitHeader(String key)Checks if header is Test Kit specific headerstatic org.apache.camel.ExchangeparseExchangeProperties(EndpointProperties properties, org.apache.camel.CamelContext camelContext)Create exchange from test definitionstatic org.apache.camel.ConsumerresolveConsumer(org.apache.camel.Exchange exchange, org.apache.camel.CamelContext camelContext)Get camel consumer based on exchange route idstatic org.apache.camel.EndpointresolveEndpoint(org.apache.camel.Exchange exchange, org.apache.camel.CamelContext camelContext)Get camel endpoint based on exchange route idstatic org.apache.camel.RouteresolveRoute(org.apache.camel.Exchange exchange, org.apache.camel.CamelContext camelContext)Get camel route based on exchange route id-
Methods inherited from class de.ikor.sip.foundation.core.util.SIPExchangeHelper
filterNonSerializableHeaders, reassignNonSerializableValue
-
-
-
-
Method Detail
-
getRouteId
public static String getRouteId(org.apache.camel.Exchange exchange)
Get route id from theExchange- Parameters:
exchange- that should be mapped- Returns:
- route id
-
resolveEndpoint
public static org.apache.camel.Endpoint resolveEndpoint(org.apache.camel.Exchange exchange, org.apache.camel.CamelContext camelContext)Get camel endpoint based on exchange route id- Parameters:
exchange- for fetching the route idcamelContext- in which endpoints are defined- Returns:
Endpoint
-
resolveRoute
public static org.apache.camel.Route resolveRoute(org.apache.camel.Exchange exchange, org.apache.camel.CamelContext camelContext)Get camel route based on exchange route id- Parameters:
exchange- for fetching the route idcamelContext- in which routes are defined- Returns:
Route
-
resolveConsumer
public static org.apache.camel.Consumer resolveConsumer(org.apache.camel.Exchange exchange, org.apache.camel.CamelContext camelContext)Get camel consumer based on exchange route id- Parameters:
exchange- for fetching the route idcamelContext- in which consumers are defined- Returns:
Route
-
parseExchangeProperties
public static org.apache.camel.Exchange parseExchangeProperties(EndpointProperties properties, org.apache.camel.CamelContext camelContext)
Create exchange from test definition- Parameters:
properties- with route id and payload for exchange bodycamelContext- camel context- Returns:
Exchange
-
isTestKitHeader
public static boolean isTestKitHeader(String key)
Checks if header is Test Kit specific header- Parameters:
key- of header for checking- Returns:
- boolean
-
-