Package | Description |
---|---|
bt.event | |
bt.net | |
bt.torrent | |
bt.torrent.messaging |
Modifier and Type | Method and Description |
---|---|
ConnectionKey |
PeerConnectedEvent.getConnectionKey() |
ConnectionKey |
PeerDisconnectedEvent.getConnectionKey() |
ConnectionKey |
PeerBitfieldUpdatedEvent.getConnectionKey() |
Modifier and Type | Method and Description |
---|---|
void |
EventSink.firePeerBitfieldUpdated(TorrentId torrentId,
ConnectionKey connectionKey,
Bitfield bitfield)
Generate event, that local information about some peer's data has been updated.
|
void |
EventBus.firePeerBitfieldUpdated(TorrentId torrentId,
ConnectionKey connectionKey,
Bitfield bitfield) |
void |
EventSink.firePeerConnected(ConnectionKey connectionKey)
Generate event, that a new connection with some peer has been established.
|
void |
EventBus.firePeerConnected(ConnectionKey connectionKey) |
void |
EventSink.firePeerDisconnected(ConnectionKey connectionKey)
Generate event, that a connection with some peer has been terminated.
|
void |
EventBus.firePeerDisconnected(ConnectionKey connectionKey) |
Constructor and Description |
---|
PeerBitfieldUpdatedEvent(long id,
long timestamp,
ConnectionKey connectionKey,
Bitfield bitfield) |
PeerConnectedEvent(long id,
long timestamp,
ConnectionKey connectionKey) |
PeerDisconnectedEvent(long id,
long timestamp,
ConnectionKey connectionKey) |
Modifier and Type | Method and Description |
---|---|
void |
IMessageDispatcher.addMessageConsumer(ConnectionKey connectionKey,
Consumer<Message> messageConsumer)
Add a message consumer to receive messages from a remote peer for a given torrent.
|
void |
MessageDispatcher.addMessageConsumer(ConnectionKey connectionKey,
Consumer<Message> messageConsumer) |
void |
IMessageDispatcher.addMessageSupplier(ConnectionKey connectionKey,
Supplier<Message> messageSupplier)
Add a message supplier to send messages to a remote peer for a given torrent.
|
void |
MessageDispatcher.addMessageSupplier(ConnectionKey connectionKey,
Supplier<Message> messageSupplier) |
PeerConnection |
PeerConnectionPool.getConnection(ConnectionKey key) |
PeerConnection |
IPeerConnectionPool.getConnection(ConnectionKey key) |
Modifier and Type | Method and Description |
---|---|
Set<ConnectionKey> |
DefaultTorrentSessionState.getConnectedPeers() |
Set<ConnectionKey> |
TorrentSessionState.getConnectedPeers() |
Modifier and Type | Method and Description |
---|---|
void |
BitfieldBasedStatistics.addBitfield(ConnectionKey connectionKey,
PeerBitfield bitfield)
Add peer's bitfield.
|
void |
BitfieldBasedStatistics.addPiece(ConnectionKey connectionKey,
Integer pieceIndex)
Update peer's bitfield by indicating that the peer has a given piece.
|
Optional<PeerBitfield> |
BitfieldBasedStatistics.getPeerBitfield(ConnectionKey connectionKey)
Get peer's bitfield, if present.
|
void |
BitfieldBasedStatistics.removeBitfield(ConnectionKey connectionKey)
Remove peer's bitfield.
|
Modifier and Type | Method and Description |
---|---|
ConnectionKey |
MessageContext.getConnectionKey() |
Modifier and Type | Method and Description |
---|---|
Map<ConnectionKey,byte[]> |
BitfieldCollectingConsumer.getBitfields() |
Map<ConnectionKey,Set<Integer>> |
BitfieldCollectingConsumer.getHaves() |
Set<ConnectionKey> |
TorrentWorker.getPeers()
Get all peers, that this torrent worker is currently working with.
|
Set<ConnectionKey> |
Assignments.update(Set<ConnectionKey> ready,
Set<ConnectionKey> choking) |
Modifier and Type | Method and Description |
---|---|
Optional<bt.torrent.messaging.Assignment> |
Assignments.assign(ConnectionKey connectionKey) |
PeerWorker |
PeerWorkerFactory.createPeerWorker(ConnectionKey connectionKey) |
PeerWorker |
IPeerWorkerFactory.createPeerWorker(ConnectionKey connectionKey)
Create a torrent-aware peer worker for a given peer connection.
|
bt.torrent.messaging.Assignment |
Assignments.get(ConnectionKey connectionKey) |
ConnectionState |
TorrentWorker.getConnectionState(ConnectionKey connectionKey)
Get the current state of a connection with a particular peer.
|
void |
TorrentWorker.removePeer(ConnectionKey connectionKey)
Called when a peer leaves the torrent processing session.
|
Modifier and Type | Method and Description |
---|---|
Set<ConnectionKey> |
Assignments.update(Set<ConnectionKey> ready,
Set<ConnectionKey> choking) |
Set<ConnectionKey> |
Assignments.update(Set<ConnectionKey> ready,
Set<ConnectionKey> choking) |
Copyright © 2016–2021. All rights reserved.