public class PeerExchangePeerSourceFactory extends Object implements PeerSourceFactory
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 |
---|
PeerExchangePeerSourceFactory(EventSource eventSource,
IRuntimeLifecycleBinder lifecycleBinder,
PeerExchangeConfig pexConfig,
Config config) |
Modifier and Type | Method and Description |
---|---|
void |
consume(ExtendedHandshake handshake,
MessageContext messageContext) |
void |
consume(bt.peerexchange.PeerExchange message,
MessageContext messageContext) |
PeerSource |
getPeerSource(TorrentId torrentId)
Create a peer source for a given torrent.
|
void |
produce(Consumer<Message> messageConsumer,
MessageContext messageContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPeerSource
@Inject public PeerExchangePeerSourceFactory(EventSource eventSource, IRuntimeLifecycleBinder lifecycleBinder, PeerExchangeConfig pexConfig, Config config)
public PeerSource getPeerSource(TorrentId torrentId)
PeerSourceFactory
getPeerSource
in interface PeerSourceFactory
public void consume(ExtendedHandshake handshake, MessageContext messageContext)
public void consume(bt.peerexchange.PeerExchange message, MessageContext messageContext)
public void produce(Consumer<Message> messageConsumer, MessageContext messageContext)
Copyright © 2016–2021. All rights reserved.