public class ConnectionSource extends Object implements IConnectionSource
Constructor and Description |
---|
ConnectionSource(Set<PeerConnectionAcceptor> connectionAcceptors,
IPeerConnectionFactory connectionFactory,
IPeerConnectionPool connectionPool,
IRuntimeLifecycleBinder lifecycleBinder,
Config config) |
Modifier and Type | Method and Description |
---|---|
ConnectionResult |
getConnection(Peer peer,
TorrentId torrentId)
Get connection for a given peer and torrent ID.
|
CompletableFuture<ConnectionResult> |
getConnectionAsync(Peer peer,
TorrentId torrentId)
Get connection for a given peer and torrent ID asynchronously.
|
@Inject public ConnectionSource(Set<PeerConnectionAcceptor> connectionAcceptors, IPeerConnectionFactory connectionFactory, IPeerConnectionPool connectionPool, IRuntimeLifecycleBinder lifecycleBinder, Config config)
public ConnectionResult getConnection(Peer peer, TorrentId torrentId)
IConnectionSource
getConnection
in interface IConnectionSource
ConnectionResult
public CompletableFuture<ConnectionResult> getConnectionAsync(Peer peer, TorrentId torrentId)
IConnectionSource
getConnectionAsync
in interface IConnectionSource
ConnectionResult
Copyright © 2016–2021. All rights reserved.