Class AbstractMessageReceiverEndpoint
java.lang.Object
de.otto.synapse.endpoint.AbstractMessageEndpoint
de.otto.synapse.endpoint.receiver.AbstractMessageReceiverEndpoint
- All Implemented Interfaces:
MessageEndpoint,MessageReceiverEndpoint
- Direct Known Subclasses:
AbstractMessageLogReceiverEndpoint
public class AbstractMessageReceiverEndpoint extends AbstractMessageEndpoint implements MessageReceiverEndpoint
Receiver-side
MessageEndpoint endpoint of a Message Channel
-
Constructor Summary
Constructors Constructor Description AbstractMessageReceiverEndpoint(java.lang.String channelName, MessageInterceptorRegistry interceptorRegistry, org.springframework.context.ApplicationEventPublisher eventPublisher) -
Method Summary
Modifier and Type Method Description EndpointTypegetEndpointType()MessageDispatchergetMessageDispatcher()Returns the MessageDispatcher that is used to dispatch messages.protected voidpublishEvent(MessageReceiverStatus status, java.lang.String message, ChannelDurationBehind durationBehind)voidregister(MessageConsumer<?> messageConsumer)Registers a MessageConsumer at the receiver endpoint.Methods inherited from class de.otto.synapse.endpoint.AbstractMessageEndpoint
getChannelName, getInterceptorChain, interceptMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.otto.synapse.endpoint.MessageEndpoint
getChannelName, getInterceptorChain, intercept
-
Constructor Details
-
AbstractMessageReceiverEndpoint
public AbstractMessageReceiverEndpoint(@Nonnull java.lang.String channelName, @Nonnull MessageInterceptorRegistry interceptorRegistry, @Nullable org.springframework.context.ApplicationEventPublisher eventPublisher)
-
-
Method Details
-
register
Registers a MessageConsumer at the receiver endpoint.consumershave to be thread safe as they might be called from multiple threads in parallel (e.g. for kinesis streams there is one thread per shard).- Specified by:
registerin interfaceMessageReceiverEndpoint- Parameters:
messageConsumer- registered EventConsumer
-
getMessageDispatcher
Returns the MessageDispatcher that is used to dispatch messages.- Specified by:
getMessageDispatcherin interfaceMessageReceiverEndpoint- Returns:
- MessageDispatcher
-
getEndpointType
Description copied from interface:MessageEndpoint- Specified by:
getEndpointTypein interfaceMessageEndpoint- Returns:
- EndpointType
-
publishEvent
protected void publishEvent(@Nonnull MessageReceiverStatus status, @Nullable java.lang.String message, @Nullable ChannelDurationBehind durationBehind)
-