Class ReplaceStringTransformer
- java.lang.Object
-
- org.swisspush.gateleen.player.exchange.ReplaceStringTransformer
-
- All Implemented Interfaces:
com.google.common.base.Function<Exchange,Exchange>,Function<Exchange,Exchange>
public class ReplaceStringTransformer extends Object implements com.google.common.base.Function<Exchange,Exchange>
Transform an exchange into a new one by replacing all string pattern occurences in URL, headers and body.- Author:
- https://github.com/lbovet [Laurent Bovet]
-
-
Constructor Summary
Constructors Constructor Description ReplaceStringTransformer(String pattern, String with)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Exchangeapply(Exchange exchange)static ReplaceStringTransformerclearTimestamps()Predefined transformer replacing all timestamps with the epoch (1970-01-01T00:00:00Z).static ReplaceStringTransformerclearUUIDs()Predefined transformer placing all UUIDs with a blank one (00000000-0000-0000-0000-000000000000).
-
-
-
Method Detail
-
clearTimestamps
public static ReplaceStringTransformer clearTimestamps()
Predefined transformer replacing all timestamps with the epoch (1970-01-01T00:00:00Z).- Returns:
- ReplaceStringTransformer
-
clearUUIDs
public static ReplaceStringTransformer clearUUIDs()
Predefined transformer placing all UUIDs with a blank one (00000000-0000-0000-0000-000000000000).- Returns:
- ReplaceStringTransformer
-
-