public class MessageDispatcher extends Object implements IMessageDispatcher
Note that this class implements a service. Hence, is not a part of the public API and is a subject to change.
| Constructor and Description | 
|---|
| MessageDispatcher(IRuntimeLifecycleBinder lifecycleBinder,
                 IPeerConnectionPool pool,
                 TorrentRegistry torrentRegistry,
                 Config config) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addMessageConsumer(ConnectionKey connectionKey,
                  Consumer<Message> messageConsumer)Add a message consumer to receive messages from a remote peer for a given torrent. | 
| void | addMessageSupplier(ConnectionKey connectionKey,
                  Supplier<Message> messageSupplier)Add a message supplier to send messages to a remote peer for a given torrent. | 
@Inject public MessageDispatcher(IRuntimeLifecycleBinder lifecycleBinder, IPeerConnectionPool pool, TorrentRegistry torrentRegistry, Config config)
public void addMessageConsumer(ConnectionKey connectionKey, Consumer<Message> messageConsumer)
IMessageDispatcheraddMessageConsumer in interface IMessageDispatcherpublic void addMessageSupplier(ConnectionKey connectionKey, Supplier<Message> messageSupplier)
IMessageDispatcheraddMessageSupplier in interface IMessageDispatcherCopyright © 2016–2021. All rights reserved.