InMemoryPublisher

public final class InMemoryPublisher extends AbstractChannel implements Publisher

An in-memory implementation of the Publisher.

To use only in scope of the same JVM as subscribers.

Functions

Link copied to clipboard
public void close()
Does nothing as there are no resources to close in the in-memory implementation.
Link copied to clipboard
public boolean isStale()
Always returns false as publishers don't get stale.
Link copied to clipboard
public Ack publish(Any messageId, ExternalMessage message)
Publishes a given ExternalMessage to the channel under a given ID.

Inherited functions

Link copied to clipboard
public static ChannelId channelIdFor(TypeUrl messageType)
Converts the given message type into a ChannelId.
Link copied to clipboard
public ChannelId id()
Obtains the channel identifier.
Link copied to clipboard
public TypeUrl targetType()
Obtains the type of the messages transferred through this channel.