Package de.otto.synapse.endpoint
Class DefaultReceiverHeadersInterceptor
java.lang.Object
de.otto.synapse.endpoint.DefaultReceiverHeadersInterceptor
A
message interceptor that is able to add some commonly required header attributes in
Synapse services.
The DefaultReceiverHeadersInterceptor is active by default for all
receiver endpoints. It can be disabled by
setting 'synapse.receiver.default-headers.enabled=false'.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultReceiverHeadersInterceptor(SynapseProperties synapseProperties) Creates a new DefaultReceiverHeadersInterceptor with default configuration.DefaultReceiverHeadersInterceptor(SynapseProperties synapseProperties, Clock clock) Creates an instance of DefaultReceiverHeadersInterceptor for testing purposes. -
Method Summary
-
Constructor Details
-
DefaultReceiverHeadersInterceptor
Creates a new DefaultReceiverHeadersInterceptor with default configuration.- Parameters:
synapseProperties- the properties used to configure the interceptor
-
DefaultReceiverHeadersInterceptor
Creates an instance of DefaultReceiverHeadersInterceptor for testing purposes.- Parameters:
synapseProperties- the properties used to configure the interceptorclock- the clock used to generate timestamp attributes
-
-
Method Details
-
addDefaultHeaders
@Nullable @MessageInterceptor(endpointType=RECEIVER) public TextMessage addDefaultHeaders(@Nonnull TextMessage message)
-