net.i2p.router.tunnel.pool
Class ClientPeerSelector

java.lang.Object
  extended bynet.i2p.router.tunnel.pool.TunnelPeerSelector
      extended bynet.i2p.router.tunnel.pool.ClientPeerSelector

class ClientPeerSelector
extends TunnelPeerSelector

Pick peers randomly out of the fast pool, and put them into tunnels in a random order


Constructor Summary
(package private) ClientPeerSelector()
           
 
Method Summary
protected  int getLength(RouterContext ctx, TunnelPoolSettings settings)
           
protected  java.util.List selectExplicit(RouterContext ctx, TunnelPoolSettings settings, int length)
           
 java.util.List selectPeers(RouterContext ctx, TunnelPoolSettings settings)
          Which peers should go into the next tunnel for the given settings?
protected  boolean shouldSelectExplicit(TunnelPoolSettings settings)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientPeerSelector

ClientPeerSelector()
Method Detail

selectPeers

public java.util.List selectPeers(RouterContext ctx,
                                  TunnelPoolSettings settings)
Description copied from class: TunnelPeerSelector
Which peers should go into the next tunnel for the given settings?

Specified by:
selectPeers in class TunnelPeerSelector
Returns:
ordered list of Hash objects (one per peer) specifying what order they should appear in a tunnel (endpoint first). This includes the local router in the list. If there are no tunnels or peers to build through, and the settings reject 0 hop tunnels, this will return null.

getLength

protected int getLength(RouterContext ctx,
                        TunnelPoolSettings settings)

shouldSelectExplicit

protected boolean shouldSelectExplicit(TunnelPoolSettings settings)

selectExplicit

protected java.util.List selectExplicit(RouterContext ctx,
                                        TunnelPoolSettings settings,
                                        int length)