public class DistributedRelay extends Object implements BufferRequestListener
| Constructor and Description |
|---|
DistributedRelay(Peer peer,
RelayRPC relayRPC,
RelayClientConfig relayConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRelayListener(RelayListener relayListener) |
List<BaseRelayClient> |
relayClients()
Returns connections to current relay peers
|
RelayClientConfig |
relayConfig() |
FutureDone<Void> |
sendBufferRequest(String relayPeerId)
Call this if the buffer should be obtained from a relay peer.
|
FutureRelay |
setupRelays(FutureRelay futureRelay)
Sets up relay connections to other peers.
|
FutureForkJoin<FutureDone<Void>> |
shutdown() |
public DistributedRelay(Peer peer, RelayRPC relayRPC, RelayClientConfig relayConfig)
peer - the unreachable peerrelayRPC - the relay RPCmaxFail - relayConfig - maxRelays - maximum number of relay peers to set uprelayType - the kind of the relay connectionpublic RelayClientConfig relayConfig()
public List<BaseRelayClient> relayClients()
public void addRelayListener(RelayListener relayListener)
public FutureForkJoin<FutureDone<Void>> shutdown()
public FutureRelay setupRelays(FutureRelay futureRelay)
PeerAddress#MAX_RELAYS or passed to the
constructor of this class. It is important that we call this after we
bootstrapped and have recent information in our peer map.DistributedRelay instancepublic FutureDone<Void> sendBufferRequest(String relayPeerId)
BufferRequestListenersendBufferRequest in interface BufferRequestListenerrelayPeerId - the relay's peer idCopyright © 2015. All rights reserved.