Package de.otto.synapse.channel
Class InMemoryChannel
java.lang.Object
de.otto.synapse.endpoint.AbstractMessageEndpoint
de.otto.synapse.endpoint.receiver.AbstractMessageReceiverEndpoint
de.otto.synapse.endpoint.receiver.AbstractMessageLogReceiverEndpoint
de.otto.synapse.channel.InMemoryChannel
- All Implemented Interfaces:
de.otto.synapse.endpoint.MessageEndpoint,de.otto.synapse.endpoint.receiver.MessageLogReceiverEndpoint,de.otto.synapse.endpoint.receiver.MessageQueueReceiverEndpoint,de.otto.synapse.endpoint.receiver.MessageReceiverEndpoint
public class InMemoryChannel
extends de.otto.synapse.endpoint.receiver.AbstractMessageLogReceiverEndpoint
implements de.otto.synapse.endpoint.receiver.MessageLogReceiverEndpoint, de.otto.synapse.endpoint.receiver.MessageQueueReceiverEndpoint
-
Constructor Summary
ConstructorsConstructorDescriptionInMemoryChannel(String channelName, de.otto.synapse.endpoint.MessageInterceptorRegistry interceptorRegistry) InMemoryChannel(String channelName, de.otto.synapse.endpoint.MessageInterceptorRegistry interceptorRegistry, org.springframework.context.ApplicationEventPublisher eventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionconsume()CompletableFuture<de.otto.synapse.channel.ChannelPosition>consumeUntil(de.otto.synapse.channel.ChannelPosition startFrom, Predicate<de.otto.synapse.channel.ShardResponse> stopCondition) List<de.otto.synapse.message.TextMessage>voidsend(de.otto.synapse.message.TextMessage message) voidstop()Methods inherited from class de.otto.synapse.endpoint.receiver.AbstractMessageReceiverEndpoint
getEndpointType, getMessageDispatcher, publishEvent, registerMethods 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, getEndpointType, getInterceptorChain, interceptMethods inherited from interface de.otto.synapse.endpoint.receiver.MessageLogReceiverEndpoint
consumeMethods inherited from interface de.otto.synapse.endpoint.receiver.MessageReceiverEndpoint
getMessageDispatcher, register
-
Constructor Details
-
InMemoryChannel
public InMemoryChannel(String channelName, de.otto.synapse.endpoint.MessageInterceptorRegistry interceptorRegistry) -
InMemoryChannel
public InMemoryChannel(String channelName, de.otto.synapse.endpoint.MessageInterceptorRegistry interceptorRegistry, org.springframework.context.ApplicationEventPublisher eventPublisher)
-
-
Method Details
-
getEventQueue
-
send
public void send(de.otto.synapse.message.TextMessage message) -
consumeUntil
@Nonnull public CompletableFuture<de.otto.synapse.channel.ChannelPosition> consumeUntil(@Nonnull de.otto.synapse.channel.ChannelPosition startFrom, @Nonnull Predicate<de.otto.synapse.channel.ShardResponse> stopCondition) - Specified by:
consumeUntilin interfacede.otto.synapse.endpoint.receiver.MessageLogReceiverEndpoint
-
consume
- Specified by:
consumein interfacede.otto.synapse.endpoint.receiver.MessageQueueReceiverEndpoint
-
stop
public void stop()- Specified by:
stopin interfacede.otto.synapse.endpoint.receiver.MessageLogReceiverEndpoint- Specified by:
stopin interfacede.otto.synapse.endpoint.receiver.MessageQueueReceiverEndpoint
-