net.i2p.router
Class PeerSelectionCriteria

java.lang.Object
  extended by net.i2p.router.PeerSelectionCriteria

public class PeerSelectionCriteria
extends java.lang.Object

Defines the criteria for selecting a set of peers for use when searching the PeerManager


Field Summary
static int PURPOSE_GARLIC
          The peers will be used for garlic routed messages
static int PURPOSE_SOURCE_ROUTE
          The peers will be used for a source routed reply block message
static int PURPOSE_TEST
          The peers will be used for a test message
static int PURPOSE_TUNNEL
          The peers will be used in a tunnel
 
Constructor Summary
PeerSelectionCriteria()
           
 
Method Summary
 int getMaximumRequired()
          Maximum number of peers required
 int getMinimumRequired()
          Minimum number of peers required
 int getPurpose()
          Purpose for which the peers will be used
 void setMaximumRequired(int max)
           
 void setMinimumRequired(int min)
           
 void setPurpose(int purpose)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PURPOSE_TUNNEL

public static final int PURPOSE_TUNNEL
The peers will be used in a tunnel

See Also:
Constant Field Values

PURPOSE_GARLIC

public static final int PURPOSE_GARLIC
The peers will be used for garlic routed messages

See Also:
Constant Field Values

PURPOSE_SOURCE_ROUTE

public static final int PURPOSE_SOURCE_ROUTE
The peers will be used for a source routed reply block message

See Also:
Constant Field Values

PURPOSE_TEST

public static final int PURPOSE_TEST
The peers will be used for a test message

See Also:
Constant Field Values
Constructor Detail

PeerSelectionCriteria

public PeerSelectionCriteria()
Method Detail

getMinimumRequired

public int getMinimumRequired()
Minimum number of peers required


setMinimumRequired

public void setMinimumRequired(int min)

getMaximumRequired

public int getMaximumRequired()
Maximum number of peers required


setMaximumRequired

public void setMaximumRequired(int max)

getPurpose

public int getPurpose()
Purpose for which the peers will be used


setPurpose

public void setPurpose(int purpose)