mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-15 03:35:52 +00:00
PeerGroup: restore and deprecate some removed addEventListener methods
This commit is contained in:
parent
f5db4b92be
commit
0342feee86
@ -750,6 +750,28 @@ public class PeerGroup implements TransactionBroadcaster {
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Use the more specific listener methods instead */
|
||||
@Deprecated @SuppressWarnings("deprecation")
|
||||
public void addEventListener(AbstractPeerEventListener listener, Executor executor) {
|
||||
addConnectionEventListener(executor, listener);
|
||||
addDataEventListener(executor, listener);
|
||||
addOnTransactionBroadcastListener(executor, listener);
|
||||
}
|
||||
|
||||
/** Use the more specific listener methods instead */
|
||||
@Deprecated @SuppressWarnings("deprecation")
|
||||
public void addEventListener(AbstractPeerEventListener listener) {
|
||||
addEventListener(listener, Threading.USER_THREAD);
|
||||
}
|
||||
|
||||
/** Use the more specific listener methods instead */
|
||||
@Deprecated @SuppressWarnings("deprecation")
|
||||
public void removeEventListener(AbstractPeerEventListener listener) {
|
||||
removeConnectionEventListener(listener);
|
||||
removeDataEventListener(listener);
|
||||
removeOnTransactionBroadcastListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a newly allocated list containing the currently connected peers. If all you care about is the count,
|
||||
* use numConnectedPeers().
|
||||
|
Loading…
x
Reference in New Issue
Block a user