public class RemoteTopicPublisher<T,M> extends net.openhft.chronicle.network.connection.AbstractStatelessClient<TopicPublisherHandler.EventId> implements TopicPublisher<T,M>
Modifier | Constructor and Description |
---|---|
|
RemoteTopicPublisher(@NotNull RequestContext context,
@NotNull Asset asset) |
protected |
RemoteTopicPublisher(@NotNull RequestContext context,
@NotNull Asset asset,
String view) |
Modifier and Type | Method and Description |
---|---|
void |
publish(T topic,
M message)
Publish the given
message to the provided topic . |
@NotNull Publisher<M> |
publisher(T topic)
Creates and returns a new Publisher for the provided
topic . |
void |
registerSubscriber(T topic,
@NotNull Subscriber<? super M> subscriber)
Registers and associates the provided
subscriber with the provided topic . |
void |
registerTopicSubscriber(@NotNull TopicSubscriber<? super T,? super M> topicSubscriber)
Add a subscription to this group.
|
void |
unregisterSubscriber(T topic,
@NotNull Subscriber<? super M> subscriber)
Unregisters and disassociates the provided
subscriber from the provided topic . |
void |
unregisterTopicSubscriber(@NotNull TopicSubscriber<? super T,? super M> topicSubscriber)
Unregister a TopicSubscriber
|
attempt, performClose, proxyReturnBoolean, proxyReturnBooleanWithArgs, proxyReturnBooleanWithSequence, proxyReturnByte, proxyReturnByte, proxyReturnInt, proxyReturnInt, proxyReturnLong, proxyReturnLongWithArgs, proxyReturnTypedObject, proxyReturnTypedObject, proxyReturnTypedObject, proxyReturnUint16, proxyReturnVoid, proxyReturnVoid, proxyReturnWireConsumer, proxyReturnWireConsumerInOut, proxyReturnWireTypedObject, readBoolean, readInt, sendBytes, sendEvent, sendEventAsync, toParameters, toParameters, writeMetaDataForKnownTID
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
registerTopicSubscriber
referenceId, referenceName, temporary
createdHere, throwExceptionIfClosed, warnAndCloseIfNotClosed
public RemoteTopicPublisher(@NotNull @NotNull RequestContext context, @NotNull @NotNull Asset asset)
protected RemoteTopicPublisher(@NotNull @NotNull RequestContext context, @NotNull @NotNull Asset asset, String view)
public void publish(@NotNull T topic, @NotNull M message)
TopicPublisher
message
to the provided topic
.publish
in interface TopicPublisher<T,M>
topic
- to publish tomessage
- to publish.public void registerTopicSubscriber(@NotNull @NotNull TopicSubscriber<? super T,? super M> topicSubscriber)
TopicPublisher
Any given instance of a subscriber must at most be registered once with a DataGrid instance at any given time.
This method is asynchronous and the provided subscriber will be eligible for receiving events as some later unspecified time.
registerTopicSubscriber
in interface TopicPublisher<T,M>
topicSubscriber
- to listen to events.public void unregisterTopicSubscriber(@NotNull @NotNull TopicSubscriber<? super T,? super M> topicSubscriber)
TopicPublisher
This method is asynchronous and the provided subscriber will be prevented from receiving events as some later unspecified time.
unregisterTopicSubscriber
in interface TopicPublisher<T,M>
topicSubscriber
- to unregister@NotNull public @NotNull Publisher<M> publisher(@NotNull T topic)
TopicPublisher
topic
.publisher
in interface TopicPublisher<T,M>
topic
- to create a Publisher fortopic
public void registerSubscriber(@NotNull T topic, @NotNull @NotNull Subscriber<? super M> subscriber)
TopicPublisher
subscriber
with the provided topic
.
Any given instance of a subscriber must at most be registered once with a DataGrid instance at any given time.
This method is asynchronous and the provided subscriber will be eligible for receiving events as some later unspecified time.
registerSubscriber
in interface TopicPublisher<T,M>
topic
- to associate with the given subscriber
subscriber
- to registerpublic void unregisterSubscriber(@NotNull T topic, @NotNull @NotNull Subscriber<? super M> subscriber)
TopicPublisher
subscriber
from the provided topic
.
This method is asynchronous and the provided subscriber will be prevented from receiving events as some later unspecified time.
unregisterSubscriber
in interface TopicPublisher<T,M>
topic
- to disassociates from the given subscriber
subscriber
- to unregisterCopyright © 2021. All rights reserved.