net.tomp2p.futures
Class FutureWrappedBootstrap<K extends BaseFuture>

java.lang.Object
  extended by net.tomp2p.futures.BaseFutureImpl<K>
      extended by net.tomp2p.futures.FutureWrapper<K>
          extended by net.tomp2p.futures.FutureWrappedBootstrap<K>
Type Parameters:
K -
All Implemented Interfaces:
BaseFuture, Cancellable, FutureBootstrap

public class FutureWrappedBootstrap<K extends BaseFuture>
extends FutureWrapper<K>
implements FutureBootstrap

The bootstrap will be a wrapped future, because we need to ping a server first, and if this ping is successful, we can bootstrap.

Author:
Thomas Bocek

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.tomp2p.futures.BaseFuture
BaseFuture.FutureType
 
Field Summary
 
Fields inherited from class net.tomp2p.futures.BaseFutureImpl
completed, lock, reason, type
 
Constructor Summary
FutureWrappedBootstrap()
           
 
Method Summary
 Collection<PeerAddress> getBootstrapTo()
          Returns a list of of peers that were involved in the bootstrapping
 void setBootstrapTo(Collection<PeerAddress> bootstrapTo)
          The addresses we boostrap to.
 
Methods inherited from class net.tomp2p.futures.FutureWrapper
getWrappedFuture, waitFor
 
Methods inherited from class net.tomp2p.futures.BaseFutureImpl
addCancellation, addListener, addListener, await, await, awaitListeners, awaitUninterruptibly, awaitUninterruptibly, cancel, getFailedReason, getType, isCompleted, isFailed, isSuccess, notifyListerenrs, removeListener, self, setCompletedAndNotify, setFailed, setFailed, setFailed, setFailed, setFailed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.tomp2p.futures.BaseFuture
addCancellation, addListener, addListener, await, await, awaitListeners, awaitUninterruptibly, awaitUninterruptibly, getFailedReason, getType, isCompleted, isFailed, isSuccess, removeListener, setFailed, setFailed, setFailed, setFailed, setFailed
 
Methods inherited from interface net.tomp2p.futures.Cancellable
cancel
 

Constructor Detail

FutureWrappedBootstrap

public FutureWrappedBootstrap()
Method Detail

setBootstrapTo

public void setBootstrapTo(Collection<PeerAddress> bootstrapTo)
The addresses we boostrap to. If we broadcast, we don't know the addresses in advance.

Parameters:
bootstrapTo - A list of peers that were involved in the bootstrapping

getBootstrapTo

public Collection<PeerAddress> getBootstrapTo()
Returns a list of of peers that were involved in the bootstrapping

Specified by:
getBootstrapTo in interface FutureBootstrap
Returns:
the peers we bootstrapped to.


Copyright © 2013. All Rights Reserved.